ST. LOUIS — The Dodgers got some help from a former Cardinal before their pivotal series against St. Louis.
David Freese, who joined Los Angeles in a trade with the Pirates at the end of August, offered some insight on the Cardinals' young pitchers during the Dodgers' hitters meeting. The advice paid off.
Manny Machado homered and drove in three runs to back Clayton Kershaw, and the Dodgers beat the Cardinals 9-7 in the opener of a four-game series between playoff contenders.
"Just better approaches," Machado said. "Keep it simple. See the ball, hit the ball. The guy's going to have to throw it over the plate and when we make good contact and when we're at our best, we're not going to miss those opportunities."
The Dodgers snapped a five-game losing streak against the Cardinals and moved to within one game of St. Louis for the final NL wild-card spot. The Cardinals, who went 22-6 in August, lost their second straight game and fell to 5-7 in September.
Kershaw (8-5), pitching at Busch Stadium for the first time since taking the loss in Game 4 of the 2014 NL division series, struck out eight in six innings, allowing four runs — three earned — on eight hits and two walks.
"I felt good tonight," Kershaw said. "My curveball wasn't great but my other two (pitches) I felt like I had good command tonight."
Freese tripled on a 14-pitch at-bat against Austin Gomber to score Chris Taylor and Machado in the first. Matt Kemp followed with a single to score Freese.
"I threw him everything I had," Gomber said. "I went back and looked at the video. I thought the first 13 pitches were good pitches and the 14th one wasn't. He made me pay. Kind of just how the night went. They put some swings on pitches that I thought were good pitches."
Kershaw's RBI single started a four-run fourth and drove Gomber (5-1) from the game. Taylor followed with an RBI double, and Justin Turner and Machado had sacrifice flies as the Dodgers went ahead 8-1.
Machado went 3 for 4, and his solo homer in the seventh traveled 417 feet to center.
"We did what we needed to do," Machado said. "We got runners in scoring position. We got the runners in. Hopefully we can repeat it."
It was Gomber's first loss in the majors. The rookie left-hander went three-plus innings and gave up a career-high seven runs on nine hits.
"You saw us fighting and winning pitches," Dodgers manager Dave Roberts said. "We have a lineup that can kind of grind starters and get a big hit and use the whole field."
Cardinals reliever Tyson Ross hit his second career home run in the fifth, sparking a three-run rally. He became the fourth Cardinals pitcher to homer this season, the most the team has had since 1966.
Matt Carpenter had a pair of singles and scored twice. Marcell Ozuna had two hits, an RBI and scored a run.
"I'm really proud of the guys tonight," Cardinals manager Mike Shildt said. "They one-through-nine battled to the end. That's what this team does."
The Cardinals scored twice and brought the tying run to the plate in the ninth. Dodgers closer Kenley Jansen needed 29 pitches to finish the game in a non-save situation.
"It got a little nerve-wracking there," Roberts said. "Obviously he's our guy, but he wasn't sharp tonight and he found a way to close it out for us."
The attendance was announced at 40,997, putting the Cardinals over the 3 million mark for the 15 straight season and 22nd overall.
Dodgers: RHP Ross Stripling will move back into the rotation for Sunday's game, moving LHP Hyun-Jin Ryu back to Monday and LHP Alex Wood to the bullpen.
Cardinals: C Yadier Molina (left hamstring tightness) returned to the starting lineup after missing six games. He went 0 for 1 with a walk before leaving the game after the fourth inning with St. Louis trailing by seven. "He feels like he can catch without any issue, and clearly he'll be a little compromised on the bases," Shildt said. "It's something that we'll sacrifice him scoring maybe a run, of course clearly we might pinch-run for him late in the game if it's applicable."
The Cardinals send RHP Jack Flaherty (8-6, 2.92 ERA) to the mound Friday night. The Dodgers will counter with RHP Walker Buehler (6-5, 3.09) in a rematch of a duel between the rookies in a 3-1 Cardinals win at Dodger Stadium on Aug. 22. Flaherty struck out 10 in that game, giving up one hit (a solo homer by Joc Pederson) in six innings, while Buehler allowed three hits and struck out nine over seven scoreless innings.