Michael Wacha figured he was walking a tightrope through the first five innings.
The Royals finally got to him in the sixth.
Kansas City scored three runs against the Cardinals' young starter, and St. Louis was unable to answer the rally over the final three innings.
The result was a 3-2 loss Thursday night that ended its string of eight straight wins at Kauffman Stadium.
"I made a lot of mistakes tonight, even early on that I got away with," Wacha said. "I just didn't have the command I needed to get out of there in that sixth inning. They just kept putting good at-bats together, started hitting my mistakes in that sixth."
Wacha (4-4) had only allowed two hits through the first five innings before Alcides Escobar started the Royals' rally with a double. Nori Aoki followed with an RBI double and Eric Hosmer hit a single through a drawn-in infield to knot the game 2-all.
Salvador Perez followed with another single to give Kansas City the lead.
"He had a good rhythm going, a good plan," Cardinals manager Mike Matheny said of Wacha, who had been 2-0 with a 1.73 ERA in his past four starts.
"Then all of a sudden they were putting the ball in play and just couldn't get it at somebody."
Yordano Ventura was the beneficiary of the rally.
The right-hander returned from a sore elbow to keep the Royals in the game, pitching to contact and taking advantage of his defense. Ventura (3-5) lasted six innings before turning the game over to his bullpen, which shut out St. Louis the rest of the way.
Still, Greg Holland made it interesting in the ninth.
After Francisley Bueno and Wade Davis each threw a perfect inning, Oscar Taveras greeted Holland with a grounder toward second base that Omar Infante fielded deep in the hole and threw awkwardly to first. Umpire Dan Iassogna initially ruled the throw beat Taveras to the bag, but a video review showed that he was clearly safe.
Holland proceeded to strike out Jhonny Peralta, but a wild pitch sent pinch runner Randal Grichuk to second base. Holland then struck out Jon Jay and Peter Bourjos to end the game.
"You start getting into the backend of that pen and the stuff they have and the numbers aren't going to lie," Matheny said. "These guys have been shutting the door, getting a lot of strikeouts and swings and misses like we had tonight and a lot of chases out of the zone. It's hard guys to get something off."
Matt Carpenter and Bourjos each drove in runs for the Cardinals, who dropped the first two games of the four-game, two-city series at Busch Stadium, and then won 5-2 in 11 innings on Wednesday night before falling in the series finale.
Kansas City improved to 6-2 against National League clubs this season, while its slumping cross-state rivals lost for the seventh time in their past eight games.
"To win the series is huge," Hosmer said. "It's been a while since we beat those guys at home."
The fact that Aoki had a part in the Royals' sixth-inning rally was perhaps fitting.
The outfielder was leading off in the first inning when he took a pitch low and inside. He was still leaning slightly over the plate when Yadier Molina tried to return the ball to Wacha, and the throw instead ricocheted hard off Aoki's helmet and toward the third-base dugout.
Aoki crumpled into a heap for several minutes before resuming his at-bat. He later grounded out, but hurt the Cardinals with his double during the Royals' decisive rally.
"Yadi was real apologetic," Royals manager Yost said. "Nori was just like, 'Ok, ok.'"
NOTES: Cardinals 2B Kolten Wong left in the fifth inning with soreness in his left shoulder, which he hurt diving for a ball Tuesday night in St. Louis. Daniel Descalso replaced him. ... Royals RHP Jeremy Guthrie starts a four-game series against the Yankees on Friday night. Cardinals RHP Lance Lynn will start for St. Louis to open its three-game set in Toronto.