Chris Carpenter was hoping to put an end to the St. Louis Cardinals' losing skid.

Carpenter pitched eight innings, throwing 124 pitches, his most in nearly 10 years. Still, the Cardinals lost their seventh straight, 5-4 Friday night, after the Kansas City Royals scored the go-ahead run on a fielding error by Albert Pujols with two outs in the eighth inning.

"Losing stinks," Carpenter said. "Nobody wants to lose. But if you sit there and drop your heads and put your tail between your legs, you're not going to be ready for tomorrow."

The game was typical of how the year has gone for Carpenter (1-7), whose lone win came back on May 10 against the Cubs. He allowed 10 hits, but many were flairs, including a two-run, two-out single by Alex Gordon in the second inning that gave the Royals a 3-0 lead in the second.

"It's called buzzard luck," said St. Louis manager Tony La Russa, who managed his 2,500th game for St. Louis.

Kansas City manager Ned Yost faced Carpenter as manager of the Brewers.

"He's still tough as nails," Yost said. "He's a guy, he goes back out with 109 pitches and still competes. One of the best competitors I've ever faced."

Carpenter appeared to have pitched around a walk to Mike Moustakas leading off the eighth inning when he induced Alcides Escobar to hit a grounder to Pujols. But the ball went under Pujols glove and into right field. Moustakas, who had advanced to second on a sacrifice by Matt Treanor, scored to break a 4-all tie.

"He's a Gold Glover," La Russa said of Pujols. "He's not happy. It's a nasty play."

Pujols had a chance to make up for the error when Jon Jay singled off Kansas City closer Joakim Soria with two outs in the ninth to extend the game and bring Pujols to the plate. But Pujols grounded into a 5-4 fielder's choice to end the game.

"I got a good pitch to hit," Pujols said. "It's a pitch I probably could have hit out of the ball park and I hit it hard on the ground. If I elevate the ball, it's a game-winning, home run. That's way it goes."

Blake Wood (3-0) pitched a scoreless seventh inning for Kansas City. Soria worked the ninth for his 11th save in 16 chances.

Escobar went 2 for 4 with a run scored. He is 14 for 24 (.583) over his last seven games with eight runs.

Lance Berkman drove in three runs for the Cardinals with a bases-loaded double in the third. Berkman's double gave St. Louis a 4-3 lead. Kansas City tied it in the fourth when Royals starter Felipe Paulino laid down a sacrifice with one out and runners on first and third. Chris Getz scored when Cardinals catcher Tony Cruz tried to retire Escobar at second and Paulino was credited with an RBI.

The Royals had built a 3-0 advantage on a first-inning RBI single by Jeff Francoeur and Gordon's single in the second.

NOTES: Kansas City rookie Eric Hosmer, who went 1 for 5, is batting .197 on the road (15 for 76) as opposed to .365 at home (31 for 85). ... Carpenter's 124 pitches were his most since hurling 125 on October 6, 2001, while with the Blue Jays. ... Paulino, the first Royals' pitcher to step to the plate this year, had two sacrifices in his two at-bats. Royals pitchers went 2 for 16 last year in National League parks. ... St. Louis shortstop Tyler Greene's sixth inning single ended an 0-for-13 skid. ... Paulino has not won since beating the Cubs 3-1 on June 4, 2010, a span of 31 outings (eight starts). ... Berkman, who had just 58 RBIs last year with the Astros and Yankees, has 51 RBI in his first 61 games as a Cardinal.