MIAMI -- Hanley Ramirez's first night in the visitors' clubhouse at Marlins Park was winding down, and postgame rap music blared as he sat at his locker flanked by his three children.
They wore Dodgers jerseys; he wore a triumphant grin.
Ramirez had three hits and drove in two runs playing for the first time against the team that traded him last month, and the Los Angeles Dodgers beat Miami 5-2 on Friday night.
Ramirez, who spent seven seasons with the Marlins before being dealt away July 26, shrugged off boos from the crowd and broke a tie in the sixth inning with an RBI single. He added a 40-foot single with the bases loaded in the seventh.
"We don't expect anything less from him," said Clayton Kershaw (10-6), the chief beneficiary of Ramirez's run production. "He's one of the most talented guys I've ever played with tools-wise. He's starting to get locked in, and that's a good thing for us."
The 2009 NL batting champion hit only .246 this year for the Marlins. He's batting .259 in 15 games with the Dodgers.
"This kid has so much talent he can hurt you anytime," Miami manager Ozzie Guillen said. "He needed a change of scenery. I think it's good for him and his family. I think he'll play better for them."
Kershaw gave up two runs in 6 1/3 innings to win his third consecutive start for the Dodgers. Kenley Jansen allowed two baserunners in the ninth but completed a four-hitter to earn his 23rd save in 29 chances.
Justin Ruggiano hit his 10th homer for Miami.
Ramirez, who never reached the playoffs with the Marlins, drew more jeers than cheers each time he stepped to the plate, including in the first inning.
"I was surprised they booed him as much as they did," Buehrle said. "I kind of stepped back to give him his moment to tip his hat, but he got booed too much and couldn't even do that."
Ramirez said he didn't mind the reception the fans gave him.
"That's OK," Ramirez said. "I still love them. There's a lot of love for them, and I think there was a lot of support those seven years down here."
One section of the ballpark began a derisive chant of his name, but it didn't catch on with the rest of the crowd of 28,130.
The Dodgers, embarking on a 10-game trip, rallied from a 1-0 deficit with four runs in the sixth. Shane Victorino led off with a double, took third on a sacrifice and scored on Matt Kemp's double. Ramirez followed with an RBI single, and Rivera hit his sixth homer.
The Marlins intentionally walked Kemp to load the bases with two out in the seventh. When Ramirez followed with a dribbler, catcher John Buck fielded the ball but had no play, making the score 5-2.
Ramirez took no umbrage in the Marlins' decision to walk Kemp.
"I would do it, too," he said with a laugh. "I'm hitting .240."
Ruggiano hit a homer near the Marlins' home run sculpture in the first inning, a clout estimated at 430 feet. The homer was the first allowed by Kershaw in his past eight starts.
The left-hander then retired the next 14 batters.
"He was good tonight," manager Don Mattingly said. "He has really been good almost every time out, but he's getting in a little bit of a groove, it seems like."
The Dodgers led 4-1 in the sixth when Ramirez was slow fielding a grounder on a play scored as a fielder's choice. That loaded the bases with none out, but Kershaw escaped while allowing only one run, on a sacrifice fly by Carlos Lee.
"When you face a kid of that caliber, you've got to bring your best stuff to beat him," Guillen said.
Miami left the bases loaded in the seventh and finished 0 for 6 with runners in scoring position.
Lee went 0 for 3, ending his 14-game hitting streak.
Before the game, the Dodgers activated INF Adam Kennedy (groin) from the disabled list. ... Marlins SS Jose Reyes, whose 26-game hitting streak ended Thursday, sat out because of a sore right hand. He said he expected to play Saturday. ... Marlins 2B Emilio Bonifacio (sprained left thumb) said he expects to be activated as soon as he's eligible to come off the disabled list Aug. 19. ... Ruggiano's homer was the 84th off the Dodgers this year, fewest in the majors. ... Kemp had two hits and hiked his average against lefties this year to .478.