Updated

Los Angeles, CA (SportsNetwork.com) - Hanley Ramirez's three-run homer in the bottom of the 12th boosted the Los Angeles Dodgers to a 5-2 win over the Chicago Cubs in the second of a three-game set.

Blake Parker (1-1) got the first two outs of the inning, then allowed a single to Dee Gordon, who stole second to move into scoring position. Justin Turner drew a walk before Ramirez pounced on a hanging curveball and drove it over the wall in left to end it.

"I was watching the way he was pitching to my teammates," Ramirez said. "I think he made a mistake and I made a good swing."

Jamey Wright (4-2) tossed two scoreless innings of relief to pick up the win.

Los Angeles starter Hyun-Jin Ryu allowed two runs on nine hits with six strikeouts over seven innings in a no-decision.

Tsuyoshi Wada also recorded a no-decision in opposing Ryu for the Cubs. The Japanese southpaw surrendered two runs on six hits with six punchouts over 5 2/3 innings.

"Wada did a nice job," Cubs manager Rick Renteria said. "We competed. We had opportunities. We just couldn't get them in, and they came out on top."

Chris Coghlan doubled with one out in the first and scored two batters later on Starlin Castro's single to give the Cubs a 1-0 lead.

Matt Kemp followed a Ramirez walk in the fourth with a two-run blast to left- center that pushed the Dodgers ahead by one.

The lead wouldn't hold, though, as Junior Lake singled with one gone in the seventh and Arismendy Alcantara doubled him home with two outs to pull Chicago even.

Game Notes

Yasiel Puig did not start because of mild soreness in his left hamstring. He did, however, deliver a pinch-hit single in the seventh ... Dodgers pitcher Paul Maholm suffered a torn ACL in Friday's loss and will miss the rest of the season ... Chicago had its two-game winning streak snapped ... LA's Josh Beckett will face Edwin Jackson in the rubber match on Sunday.