Josh Beckett has pitched in enough big games and been in enough pennant races to know he didn't do enough for the Los Angeles Dodgers in a significant loss for their playoff hopes.

Allen Craig drove in Shane Robinson with the go-ahead run in the seventh inning, and the St. Louis Cardinals extended their NL wild-card lead over Los Angeles to two games with a 2-1 victory Thursday night.

Beckett gave up seven hits and a run while pitching into the sixth inning of his fourth start for Los Angeles, but the former World Series MVP emerged just as frustrated as his teammates when he couldn't outpitch Lance Lynn (15-7), who threw six innings of five-hit ball.

Adrian Gonzalez had an RBI double in the Dodgers' seventh loss in eight games, and a gloom hung over Dodger Stadium in the ninth inning while the Cardinals wrapped it up.

"That's a good ballclub over there, but we've got to figure out some way to win this series," Beckett said. "They're the ones that we're chasing. ... I don't complain about run support. We've gone up against some pretty tough pitchers lately. But if you shut them out, you don't have to worry about that. You'll get no worse than a no-decision. I left 11 outs for the bullpen and I can't do that."

Beckett struck out six and had decent numbers despite laboring through long stretches of his second home start since the trade. He also didn't endear himself to Dodgers fans by putting a line drive into right field in the third inning and then getting thrown out at first by Carlos Beltran when he didn't hustle to the base.

Both teams stumbled into Dodger Stadium hardly resembling the top two contenders to face Atlanta in the NL wild card playoff game. St. Louis and Los Angeles had lost three straight and six of seven, allowing Pittsburgh, Milwaukee, Philadelphia and even Arizona to creep into striking distance in the wild-card race.

Skip Schumaker had an early run-scoring single as St. Louis (76-68) snapped its four-game road losing streak with a nail-biting win over the Dodgers (74-70). With Lynn in charge on the mound, the defending World Series champion Cardinals eked out just enough runs to earn their fourth win in 16 games in the opener of a key four-game series.

"We've got to stop worrying about what everybody else is doing and go out and win games ourselves," Beckett said. "That's a good ballclub over there, but we've got to figure out some way to win this series. They're the ones that we're chasing."

After rescuing Beckett from a sixth-inning jam, rookie Paco Rodriguez (0-1) walked Robinson and allowed Matt Carpenter's one-out single in the seventh. Ronald Belisario got Matt Holliday on a fly to center, but Craig delivered.

Jason Motte gave up Hanley Ramirez's two-out double in the ninth, but got Shane Victorino on a soft flyball to complete his 34th save.

"The pitchers are doing their job, but we're not scoring runs," said Matt Kemp, who went 1 for 4. "One run is not going to win games in series like this, so we've got to find a way to get the job done. I can't really explain what's going on. You just take one good at-bat at a time and see where it takes you."

Lynn earned his first win since July 27 for the Cardinals, striking out seven in the All-Star's stellar return to the rotation after a bullpen demotion. Yet he wasn't rewarded for his effort until Craig's single eluded two Dodgers and squeaked into right field.

"It's definitely a dogfight," said Craig, a Southern California native. "To be part of a close game with a lot of energy and to come out on top is great for our team. ... I thought it had a good chance to get through. I didn't know if I hit it hard enough, but I did."

NOTES: Craig was born in Mission Viejo and graduated from high school in Temecula. ... Rodriguez began this year at the University of Florida, where he made the All-SEC first team. The Dodgers' second-round pick was the first member of the 2012 draft class to make the majors when he debuted in San Francisco last Sunday. ... Beckett hadn't pitched against the Cardinals since 2005. ... Entering the night, Lynn led the NL with 6.60 runs of support per game.