ST. LOUIS -- It was a long, tempestuous game on a warm summer night that had an October feel to it.
Amid multiple hit batters, warnings, arguments and pitching changes, the Los Angeles Dodgers managed to avoid a sweep at the St. Louis Cardinals' hands Sunday night.
First baseman Adrian Gonzalez's two-out RBI single in the top of the ninth scored pinch runner Miguel Rojas from second with the tiebreaking run, and Los Angeles notched a 4-3 win at sold-out Busch Stadium.
The Dodgers (55-45) eased into a tie for first place in the National League West with the San Francisco Giants, 3-2 losers earlier in the day at Miami. Los Angeles scored more than three runs in a game for the first time since falling 14-5 on July 8 in Detroit.
"We got some good at-bats tonight and hits when we needed them," Los Angeles manager Don Mattingly said. "You don't want to have (a losing streak extended). Now we can start a new series (Monday night) in Pittsburgh off a win."
Dodgers catcher A.J. Ellis led off the ninth inning with a double against reliever Trevor Rosenthal (1-5), the sixth St. Louis pitcher. Shortstop Hanley Ramirez was hit by an 0-2 pitch with two outs, and Gonzalez stroked an 0-1 pitch into right, with Rojas scoring easily.
It was the second time Ramirez was nailed by a fastball approaching 100 mph. Before taking Rosenthal's 99-mph heater off his left hand, forcing him to leave the game, Ramirez was drilled by a 97 mph fastball on the left shoulder from starter Carlos Martinez in the fourth.
Between Ramirez's plunkings, Dodgers ace Clayton Kershaw nailed left fielder Matt Holliday in the left hip with a 95 mph fastball to lead off the Cardinals' fourth. Plate umpire Ed Hickox issued warnings to both teams.
After Ramirez was hit in the ninth, Mattingly came out and discussed the earlier warnings with Hickox.
"I don't think it was anything intentional," Mattingly said. "(Hickox) didn't think it was intentional. Everyone has to pitch inside, but if you can't pitch inside without hitting someone, your guys are at risk."
Ramirez's left shoulder and hand were taped and iced after the game. Mattingly said X-rays on Ramirez's hand were negative.
"It's just part of the game," St. Louis manager Mike Matheny said of the hit batsmen.
J.P. Howell (2-3) retired the last batter of the eighth to pick up the win, and Kenley Jansen pitched a clean ninth for his 28th save.
Kershaw threw seven innings, allowing three runs on six hits and one walk with eight strikeouts. It was the first time he surrendered more than two runs since a 3-2 loss to the Cincinnati Reds on May 28.
Martinez left after four innings. He gave up six hits and three runs while walking two and striking out five.
With the Dodgers leading 3-1 in the sixth, Kershaw issued a 10-pitch leadoff walk to third baseman Matt Carpenter. Center fielder Peter Bourjos cashed it in, launching a 2-2 slider over the wall in left-center for his third homer of the year and his first since June 3.
"He buries that slider down and in to righties," Bourjos said. "That one was a flat breaking ball out over the plate, and I didn't miss it."
Each team scored in the second inning. Los Angeles third baseman Juan Uribe blooped a two-out RBI single to right that scored right fielder Andre Ethier, who tripled with one out.
St. Louis right fielder Allen Craig drilled a hanging 0-2 curveball for a double to the wall in left-center that plated shortstop Jhonny Peralta with the equalizer.
The Dodgers took the lead again in the third as left fielder Matt Kemp and Ethier collected two-out RBI singles, cashing in walks drawn by Kershaw and Ramirez.
"It was good to do something offensively for a change," Ellis said. "We cashed in on Gonzo's huge hit. It felt good to have a little edge tonight. It was a great team win."
In losing for just the third time in 10 games, the Cardinals (54-45) remained tied for first place with the Milwaukee Brewers in the NL Central.
NOTES: Los Angeles RHP Josh Beckett (hip) will be activated Tuesday night to start in Pittsburgh. ... St. Louis LF Matt Holliday, who was lifted in the fifth inning Saturday after complaining of headaches and dizziness, was back in the lineup Sunday night and went 0-for-2 with an intentional walk and a hit-by-pitch. Holliday collided with Dodgers SS Hanley Ramirez on a pickoff play at second in the first inning Saturday, but team physicians said Holliday didn't sustain a concussion. ... Dodgers RF Yasiel Puig didn't play because of a sore left hand. Puig was plunked by a Joe Kelly changeup in the third inning Saturday.