LOS ANGELES – Marco Scutaro tied the game with his bat, then lost it with his glove.
Elian Herrera hit a liner off Scutaro's glove with the bases loaded in the bottom of the ninth inning, giving the Los Angeles Dodgers a 3-2 victory over the NL West champion San Francisco Giants on Monday night.
Scutaro tied the game at 2-2 in the eighth with a RBI single that extended his career-high hitting streak to 18 games. He scored the Giants' first run after walking in the first. The second baseman is batting .449 during the streak, the longest active one in the majors.
But he couldn't quite make a play on Herrera's hit with the infield drawn in that extended the Dodgers' winning streak to six games and kept their postseason hopes alive.
"That ball was smoked," Giants manager Bruce Bochy said. "We were in a tough situation there. It wasn't that bad a pitch, but he took a good swing and smoked it. Marco made a great effort."
Hanley Ramirez led off the ninth with a single off Santiago Casilla (7-6), advanced on a sacrifice by Shane Victorino and was held up at third on Luis Cruz's single. A.J. Ellis was intentionally walked and Herrera lined an 0-1 pitch off Scutaro's glove.
Giants catcher Buster Posey was removed in the eighth inning because of back spasms.
"We don't think it's serious, but we'll check on him tomorrow," Bochy said. "When he went down the line (on a dribbler to the pitcher) and hit the bag, he felt something, so we took him out for precautionary reasons."
Giants starter Matt Cain gave up two runs and four hits in five innings, struck out two and walked one. He's scheduled to start San Francisco's playoff opener on Saturday against either Cincinnati or Washington.
"I want to start my routine tomorrow again like normal, get ready for Saturday's game and think about whoever we're going to face," he said.
Cain gave up a home run to Andre Ethier that was his first allowed since Sept. 2 against the Chicago Cubs, a span of 30 1-3 innings. The right-hander summed up his regular season performance as "really good."
"I felt like I stayed consistent," he said. "I got on a good routine early and I really tried to stick with that. Buster and I got into a really good rhythm from the beginning of the season and we kind of kept that going throughout."
The Dodgers' sixth consecutive victory tied a season high and kept them two games behind St. Louis for the second NL wild card. Their win prevented the Cardinals from clinching a playoff berth after St. Louis beat Cincinnati 4-2. The Dodgers and Cardinals each have two games remaining.
Brandon League (2-6) got the win.
The Giants tied the game 2-2 in the eighth. Angel Pagan doubled to deep right with one out, and Scutaro singled off Kenley Jansen and took second on the throw.
After scoring 18 runs in a three-game sweep of Colorado, the Dodgers' offense stalled. Slugger Matt Kemp went 0 for 4 after hitting homers in his previous two games.
Los Angeles rallied to take a 2-1 lead in the fourth on Ethier's 20th homer — a two-run shot — on the first pitch from Cain after Mark Ellis singled to open the inning.
San Francisco led 1-0 in the first on Posey's double to deep left field with two outs, scoring Scutaro who had walked.
Dodgers starter Aaron Harang allowed one run and two hits in six innings, struck out three and walked two while facing the Giants for the first time this season.
NOTES: Dodgers 1B Adrian Gonzalez hit his career-high 47th double in the sixth, extending his hitting streak to 13 games, tops on the club this season. ... Cain turned 28 on Monday.