MILWAUKEE — Zach Duke retired the only batter he faced, birthday boy Adam Wainwright turned the page on a disappointing year and the St. Louis Cardinals strengthened their hold on the final NL wild-card spot.

Duke stranded the bases loaded with a strikeout in the 10th inning after Randal Grichuk hit an RBI single in the top half of the inning, lifting the Cardinals over the Milwaukee Brewers 2-1 on Tuesday night.

St. Louis added a game to its lead in the wild card and is now 2 1/2 up on the Pittsburgh Pirates and New York Mets.

Seung Hwan Oh (4-2) pitched out of a jam in the ninth to get the win. Duke got his first save with the Cardinals by entering to strike out pinch-hitter Manny Pina after Matt Bowman walked three batters.

The Cardinals' Jhonny Peralta led off the 10th with a single off Corey Knebel (0-2) and moved to third on Yadier Molina's ground-rule double. Jeremy Hazelbaker, who pinch ran for Peralta, scored the winning run on Grichuk's flare to right.

Wainwright dueled with Milwaukee's Wily Peralta for seven innings, and they left a 1-1 game for the bullpens to settle.

It was a resurgent performance for Wainwright, who began his 35th birthday by watching video of his younger self and deciding to make some changes.

Step one: Pant legs up.

Step two: Stop throwing like an old man.

"I changed everything up. I went pants up, and I went stirrups," Wainwright said. "I watched all my good games. It was just obvious how much more aggressive my delivery was."

Wainwright retired the first nine batters until Jonathan Villar singled leading off the fourth. Wainwright gave up three hits and one run in seven innings. He struck out seven and didn't walk a batter.

"That was the best fastball he's had all year," Matheny said. "I think he wanted to prove that turning 35 isn't that big of a deal."

Wainwright missed most of last season with a torn Achilles tendon.

"Thirty-four was a bad year for me," he said. "I'm 35 now. I've turned over a new leaf."

Neither team had a hit until the fourth and neither scored until the sixth.

St. Louis' Jedd Gyorko broke the scoreless tie with a two-out home run in the sixth. The Cardinals have homered in 19 consecutive games, tying a franchise record set in July 2006.

Martin Maldonado's run-scoring double tied it in the bottom of the inning.

Peralta retired the first nine batters before surrendering a single to Matt Carpenter, who led off the fourth.

Peralta has pitched well since being recalled from Triple-A Colorado Springs on Aug. 8 after struggling earlier in the year. He gave up three hits and one run in seven innings, walking one and striking out a season-high 10. It marked the second time in his career that he reached double digits in strikeouts.

Peralta had not gone more than six innings in a game this season.

"When you're throwing the ball good, your confidence is always going to be high," Peralta said. "Since I've come back, I've been able to execute the pitches when I want to."

The Brewers put two runners on in the ninth, but Oh struck out Chris Carter to end the threat. Milwaukee has lost six straight, all at home.

TRAINER'S ROOM

Cardinals: SS Aledmys Diaz has been sent to the team's facility in Jupiter, Florida, as he recovers from a hairline fracture in his right thumb that occurred in July. Diaz could serve as a designated hitter in a minor league rehab assignment sometime this week but still must go through more tests before he begins throwing.

Brewers: INF Will Middlebrooks (lower leg strain) was activated from the disabled list and outrighted to Triple-A. Middlebrooks can refuse the assignment and become a free agent. "It didn't look like there was going to be playing time for him in September," manager Craig Counsell said.

UP NEXT

Cardinals: Luke Weaver (1-1, 3.60 ERA) will make his fourth major league start and first against the Brewers. He earned his first win in his last start against Oakland on Friday.

Brewers: Matt Garza (4-6, 4.89) is 4-5 with a 4.25 ERA in 13 career starts against St. Louis. He surrendered seven runs in 5 2/3 innings in a loss at St. Louis on July 1.