Whatever Adam Wainwright gave away early as he groped for the feel on his pitches the Cardinals ace got back on his own later — and then some.

Never once did he lose his grip on the game.

Before Wainwright could get his first out Wednesday at Coors Field the host Colorado Rockies had a two-run lead and two more runners on base. Wainwright escaped the first found his curve and pressed on for 7 2/3 superb innings while tying a career high with three hits. Wainwright drove home the Cardinals’ first run scored the tying run and put the Cardinals ahead for good with an RBI in the fourth inning of a 4-3 victory.

“Showing why he’s the ace of our club” manager Mike Matheny said. “He looked like a completely different pitcher from the third on. The more he got into the game the sharper he got. Then he picks us up offensively. He did it all.”

Trevor Rosenthal kept Wainwright (17-9) on track for the win by stranding both of the runners he inherited in the eighth inning and closer Edward Mujica flirted with disaster before spoiling what could have been the most dramatic moment of the season for the Rockies. Todd Helton who announced Monday his plan to retire at season’s end struck out with the bases loaded to secure Mujica’s 37th save of the season.

Throughout the game — as Wainwright faltered early or as he soared late — Matheny couldn’t help but see the right-field scoreboard from the dugout. Right beyond Wainwright’s head was the score in the San Diego-Pittsburgh game. The Padres playing on behalf of the Cardinals rallied for two runs in the ninth to defeat the Pirates. The loss dropped the Pirates (87-65) two games behind the Cardinals (89-63) in the National League Central with 10 games remaining.

The lead is the Cardinals’ largest since late July.

“You can’t ignore” the scoreboard Matheny said.

The win did not come without significant complications for the Cardinals. First baseman Matt Adams left the game in the seventh inning because of a pain in his problematic right elbow.

Earlier this season Wainwright took a no-hitter into the eighth inning against Colorado and no active pitcher has been better against the Rockies. He entered Wednesday’s game with a 1.17 ERA in 10 games. At lofty Coors Field his ERA was a subterranean 1.08.

The ballpark is not that forgiving.

A well-struck double and an array of well-placed singles left Wainwright with a 2-0 deficit in the first inning and two runners on base. Troy Tulowitzki’s single to right field scored both runs. Wainwright escaped the inning with a double play and a line-out to Adams.

He continued to shift his grip and arm slot looking for his curveball. The mile-high elevation of Coors is famous for torturing pitchers and changing their stuff. Wainwright responded by changing his hold on his curveball until it had that familiar break. Then he took off. He had seven strikeouts by the end of the fifth inning. He froze hitters with his curve. He got them chasing it in the dirt. He got the NL’s leading hitter Michael Cuddyer.

He pitched most of the game with a lead no greater than two runs.

Wainwright’s double scored Daniel Descalso in the first inning and Wainwright tied the score 2-2 when he scored on the first of Matt Carpenter’s two hits. Wainwright added an RBI in the fourth and Yadier Molina drove home Matt Holliday for the difference. Wainwright made it last until the eighth.

“I locked it in and it was a completely different ballgame” Wainwright said. “At this place it’s a very fine margin for error. It’s a place that if you go into it and think your stuff won’t work your stuff won’t work. You cannot get mentally defeated by a tough park. You have to trust your ability and trust your stuff and trust your ability to make adjustments.”