ST. LOUIS — Allen Craig homered for the second time in three days and All-Star Yadier Molina also connected as the Cardinals beat the Pirates 5-4 on Sunday.
Pittsburgh was trying to sweep a series of at least three games in St. Louis for the first time since 1997.
Jason Motte got the last four outs for his 17th save in 21 chances to end the Pirates' four-game winning streak. Motte was the last in a flurry of moves by rookie manager Mike Matheny that left three players seeing time at two positions.
Matt Holliday and Shane Robinson had an RBI apiece in a two-run fifth that gave the Cardinals the 5-4 lead.
Michael McKenry's three-run homer had capped a four-run fourth that put the Pirates ahead for the first time and also gave them a homer in nine straight games. They've totaled 15 homers in their longest streak since another nine-gamer in June 2008.
Pirates manager Clint Hurdle also was inventive with substitutions, using two players at two spots. Pedro Alvarez had two hits and a walk for the Pirates before coming out with apparent leg cramps after singling to start the eighth.
Jake Westbrook (7-6) beat the Pirates for the first time in six career decisions, allowing four runs in six innings. Westbrook has won three straight decisions.
Motte got the bullpen's biggest out when Josh Harrison popped out to shallow center with two on to end the eighth.
The Pirates also had a chance to tie it in the seventh, when Robinson dropped Garrett Jones' fly ball to center for a two-base error with two out and none. Given another chance during the next at-bat, Robinson secured the ball on pinch hitter Casey McGehee's routine fly ball against Mitchell Boggs.
The Pirates gave No. 3 hitter and All-Star Andrew McCutchen a day off after the center fielder left Saturday's game with a strained left wrist from making a diving catch. Cardinals All-Star Carlos Beltran also got a day off.
Erik Bedard (4-9) threw 100 pitches in 4 2-3 innings and gave up five runs. The lefty has allowed 25 runs in 23 2-3 innings, a 9.51 ERA, in his last five starts away from home since his last road victory May 3 in St. Louis.
In his last three starts in Pittsburgh, Bedard has given up just three runs in 19 innings.