Bad luck and missed opportunities have been persistent themes in the Dodgers' slow start.

They got more of both on Friday in a 2-1 loss to the Giants in front of 43,113 at AT&T Park.

The Giants broke a 1-1 tie when Buster Posey homered into the left-field bleachers leading off the ninth inning off Ronald Belisario (2-3).

The loss came on a night when their staff ace was pitching with a heavy heart.

Clayton Kershaw had just been activated from the bereavement list earlier in the day after missing a start because of the death of his father in Texas.

He gave the Dodgers all he had while allowing one run and three hits in seven innings. He also struck out five and walked one.

But the ramifications of the game may have been bigger than the loss itself.

Shortstop Hanley Ramirez, who just came off the disabled list on Monday, left the game in the sixth with a hamstring injury trying to go from first to third with no outs on A.J. Ellis' single to right. The injury occurred on the same field and just a few feet away from where Ramirez broke his thumb in the World Baseball Classic in March as he went for a ground ball.

"It sounds like he got it pretty good," Dodgers manager Don Mattingly said, grimly comparing it to the injury Matt Kemp suffered last season.

"It's not like he's going to be back in a couple of days."

The injury followed more bad injury news earlier in the day. First baseman Adrian Gonzalez was a late scratch with neck pain after colliding with an umpire in Wednesday's game against the Rockies, and pitcher Ted Lilly went on the disabled list with a bad back.