ST. LOUIS (AP) -- The bullpen has been a major weakness for the St. Louis Cardinals. This time the relievers slammed the door.
Mitchell Boggs and Jason Motte both got big outs Sunday to protect a 5-4 victory over the Pittsburgh Pirates, who had been trying to sweep a series of at least three games in St. Louis for the first time since 1997. It was a nice confidence boost for a unit that entered the game 7-14 with a 4.62 ERA and 13 blown saves in 29 chances.
''It's been a rough couple days before today, playing a team you're behind in the standings that's playing really well,'' Boggs said. ''For us to get this last one, and for our bullpen to get some pretty big outs in a tight game, it doesn't hurt.
''We feel like we've got guys that can do the job and we'll show up tomorrow and expect to do the same thing.''
Allen Craig homered for the second time in three days and All-Star Yadier Molina also connected for the Cardinals, who prevailed in 98-degree heat. Molina has 13 homers, one shy of last year's season total, and Craig has 11 in just 39 games.
Craig is batting .378 (24 for 74) with five homers and 16 RBIs for his career against Pittsburgh.
''That home run was huge,'' manager Mike Matheny said of Craig's two-run shot in the third. ''He's dangerous every time he goes up there.''
Motte got the last four outs for his 17th save in 21 chances, and third of the season of more than one inning, to end the Pirates' four-game winning streak. Motte was the last in a flurry of moves by Matheny that left three players seeing time at two positions, and said he felt no extra pressure to finish things off.
''That's ridiculous, I'm not out there going, 'Oh man, don't screw this up or we'll get swept,''' Motte said. ''Those are negative thoughts, you go out there with those and you end up getting yourself hurt.''
Matt Holliday and rookie Shane Robinson had an RBI apiece in a two-run fifth that gave the Cardinals the 5-4 lead. Robinson had been 4 for 32 with runners in scoring position before his first career go-ahead hit.
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.
McKenry couldn't come through in the eighth when he fouled out to first against Boggs with two men on.
''They've used a lot of different bullpen guys the last few days, but their three best guys got in there today and they're as tough as anybody in the league,'' McKenry said. ''They're a special group.''
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.
''That's all it is,'' Hurdle said. ''It was tightening up, so we didn't want to push him.''
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 outs. Given another chance during the next at-bat, Robinson secured the ball on pinch-hitter Casey McGehee's routine fly ball against Boggs.
The Pirates ended a 4-3 trip including a four-game split in Philadelphia that left them 1 1/2 games behind the NL Central-leading Reds and 1 1/2 games ahead of the third-place Cardinals.
''We are pleased,'' Hurdle said. ''We lost the first two games in Philly, we battled back there, and we came in here and battled.''
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 as a concession to the persistent heat wave.
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. He hadn't been aware of the discrepancy.
''Is it that big of a split? Really?'' Bedard said. ''I didn't know, I haven't even looked at it.''
NOTES: Bedard became the 13th active pitcher with 1,000 strikeouts when he caught Holliday looking in the first. ... McGehee is 6 for 13 as a pinch hitter with three RBIs. ... McKenry is 11 for 25 with three homers and nine RBIs during a career-best seven-game hitting streak. ... Holliday is batting .493 (26 for 53) with two homers and 14 RBIs in his last 13 games. ... Westbrook has a 5.18 ERA against the Pirates.