LOS ANGELES -- Adrian Gonzalez took the high road.
The Los Angeles first baseman hit a walk-off single in the 14th inning, lifting the Dodgers to a 5-4 victory over the San Francisco Giants at Dodger Stadium in a five-hour, 29-minute marathon that started Monday night and ended early Tuesday morning.
Gonzalez, who also homered, smacked a pitch by reliever Yusmeiro Petit, allowing Los Angeles to bounce back for a win in the ninth-longest contest in franchise history. One day earlier, the Dodgers were no-hit by the Chicago Cubs' Jake Arrieta.
"For me, it was just trying to hit something into the air," said Gonzalez, who recorded the ninth walk-off hit of his career. "Petit's a high-ball pitcher. He usually throws high changes, high fastballs, and then he'll occasionally throw a curveball down. But I was just looking for something up in the zone and to make sure I stayed on top of it so I didn't pop something up in the air."
Reliever Chris Hatcher (2-5) worked a career-high three scoreless innings, helping the National League West-leading Dodgers (73-57) increase their lead to 4 1/2 games over the second-place Giants (69-62). San Francisco won nine of the previous 12 meetings between the clubs.
"That's probably our biggest win of the season," said Hatcher, who earned his first decision since May 22. "That was huge."
Giants reliever Mike Broadway (0-1) took the loss after failing to retire any of the three batters he faced.
Catcher A.J. Ellis opened the 14th with a walk. Shortstop Jimmy Rollins and second baseman Chase Utley followed with singles to load the bases. Petit replaced Broadway, and Gonzalez lined his first pitch to left.
"There's plenty of baseball left, but I'm disappointed we couldn't find a way to win this," San Francisco manager Bruce Bochy said. "It's that time of year where every series and every game is important."
Giants right fielder Marlon Byrd's RBI double with two outs in the eighth knotted the score at 4.
Gonzalez hammered a two-run homer with one out in the sixth, tying the score at 3. It was his team-leading 25th home run, the seventh time in his career he reached that mark. Gonzalez also leads active players with 20 long balls in a 146 career games against San Francisco.
Right fielder Andre Ethier gave Los Angeles the lead with his 13th home run, a solo shot to right, one batter later after Gonzalez's blast off Giants starter Jake Peavy. Ethier capped the month of August hitting .375 with three home runs and eight RBIs in 24 games.
Peavy was cruising until the sixth inning. After giving up a run in the first, Peavy retired 13 of the next 14 batters before Rollins led off the sixth with a single.
Peavy, who began the night 14-3 with a 2.30 ERA in 27 career starts against the Dodgers, surrendered four runs on six hits in 5 2/3 innings. He struck out four and walked none.
Dodgers lefty Brett Anderson allowed three runs on six hits with a walk and strikeout in five innings.
San Francisco used nine pitchers, while Los Angeles employed seven.
Rollins led off the first inning with a single and advanced to second on Utley's deep fly ball to center. Rollins scored on third baseman Justin Turner's double for a 1-0 Los Angeles lead.
In the third, Giants center fielder Gregor Blanco hit an infield single, then was forced out on a Peavy bunt. Peavy took second on a walk to left fielder Nori Aoki and third on a base hit by third baseman Matt Duffy. First baseman Brandon Belt's single knocked in the pitcher and tied the score at 1.
Byrd's RBI infield single with two outs in the inning plated Aoki and Duffy for a 3-1 San Francisco advantage.
Giants shortstop Brandon Crawford, who went 0-for-5 and was hit by a pitch, returned after missing five games with a tight left oblique.
NOTES: The Dodgers placed INF/OF Enrique Hernandez on the 15-day disabled list with a left hamstring strain. Hernandez hurt himself Sunday while running out a grounder. C Austin Barnes was recalled from Triple-A Oklahoma City to take his roster spot. ... San Francisco is 2-54 when trailing after eight innings. ... Los Angeles Lakers first-round pick D'Angelo Russell threw out the ceremonial first pitch. ... A crowd of 40,851 attended. ... Giants LHP Madison Bumgarner (16-6, 2.97 ERA) will face Dodgers RHP Zack Greinke (14-3, 1.61 ERA) on Tuesday.