MILWAUKEE — Wily Peralta is making the most of his second chance with the Milwaukee Brewers after early season struggles led to a demotion to the minors.

Peralta turned in his finest performance this year, but the Brewers lost to the St. Louis Cardinals 2-1 in 10 innings on Tuesday night.

Peralta 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 and lowered his ERA to 3.00 in five starts since returning from Triple-A Colorado Springs on Aug. 8.

“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.”

Peralta had not gone more than six innings in a game this season. He retired the first nine batters before surrendering a single to Matt Carpenter, who led off the fourth.

“This is his best start of the year, for sure,” Milwaukee manager Craig Counsell said. “The slider and the fastball were both equally good. He’s really strung together a bunch of good starts since he’s been back.”

Peralta’s outing caught the eye of St. Louis manager Mike Matheny.

“That’s the best we’ve seen him. He had a very heavy fastball and his slider was disappearing,” Matheny said. “There were a lot of swings and misses.”

Zach 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 St. Louis to victory.

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.

Peralta and St. Louis’ Adam Wainwright dueled for seven innings, leaving a 1-1 game for the bullpens.

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.

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

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.

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

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,” 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.