Updated

ST. LOUIS (AP) — Ryan Ludwick homered to snap an eighth-inning tie and reward a resourceful performance by Chris Carpenter in the St. Louis Cardinals' 3-2 victory over the skidding Washington Nationals on Tuesday night.

Felipe Lopez added a two-run homer in his second game back from an elbow injury. The Cardinals have won two straight since moving Albert Pujols to the cleanup spot, although they managed only six hits off three Washington pitchers.

Ludwick hit his sixth homer on a 1-1 delivery from Tyler Clippard (7-3), one pitch after the reliever picked off pinch-runner Brendan Ryan at first. Ludwick is batting .386 at home with three homers and eight RBIs.

Ryan Franklin worked the ninth for his ninth save in 10 chances.

Clippard has gotten the decision in his last seven outings, going 4-3, and has taken the loss in two of the last three games. In 7 2-3 innings during that stretch, he's allowed six runs and 10 hits.

Wil Nieves hit his first homer since Aug. 14 and Cristian Guzman had three singles for the Nationals, who have lost a season-worst five in a row.

Cardinals second baseman Skip Schumaker committed two errors for the second straight game, both fielding, in the eighth and ninth.

Carpenter (5-1) had only one perfect inning and allowed his seventh homer in nine starts, matching the total he yielded last season. He has flashed a temper in recent starts and slammed his glove at the back of the dugout wall after giving up Ian Desmond's tying RBI single with two outs in the eighth.

The Nationals had two runners in scoring position with one out in the seventh and came up empty, and had a pair of two-hit innings against Carpenter. The right-hander is 6-1 against the Nationals after beating them for the first time since Aug. 5, 2004, when the franchise was in Montreal. He's 4-1 with a 1.75 ERA at home.

Lopez had been 0 for 5 with three infield groundouts and a strikeout batting leadoff since coming off the 15-day disabled list before hitting a two-run homer on a full count to put the Cardinals ahead 2-1 in the fifth.

The Cardinals have won eight in a row at home against the Nationals and are 13-2 against them overall the last three seasons.

NOTES: Schumaker, dropped from leadoff to eighth, singled and scored on Lopez's homer and is 9 for 29 during an eight-game hitting streak. ... The Nationals have scored 10 runs during their losing streak.