When the Phillies failed in their attempt to trade for a fifth starter earlier this month, they had no choice but to give rookie Andrew Painter a second chance to show he could fill the role.

The 23-year-old right-hander continued to rise to the challenge Saturday night with the longest and best start of his young career – seven innings of one-run ball in a 12-3 thrashing of the St. Louis Cardinals at Citizens Bank Park.

It was the rampaging Phillies’ season-high eighth straight win.

Painter scattered five hits, walked none and struck out eight. He threw a first-pitch strike to 22 of 27 batters. His 100th pitch of the night registered 99.6 mph. He recorded 20 swings and misses with his six-pitch repertoire.

He did not look like the guy who walked off the mound with his head down after being tagged for six runs in two innings on June 17. He was demoted to Triple A after that game. Two months later, he walked off the mound with his head up and the sound of a standing ovation from the crowd of 42,218 filling his ears.

“I think it’s easy to forget how young he still is,” said J.T. Realmuto, who caught Painter’s gem. “The growth we’ve seen out of him recently. The guy we saw today – the ceiling is so high for him. If he has that demeanor and that much confidence on the mound, he can be whatever he wants in this game.”

Manager Don Mattingly was equally as effusive in his praise of Painter.

“Man, Paint was good tonight,” he said. “Just a lot of early attack. Lots of swing and miss with the breaking ball. Power changeup. Just on the attack all night long. He located all night long. He was in good counts. You can’t ask for much better than that. That’s a pretty good view into — if he turns into something like that then it’s a monster.”

Since returning from Triple A, Painter has recorded a 3.62 ERA and pitched at least into the sixth three times. The Phillies have won three of his five starts.

He’s become the fifth starter this team needed.

“You’re always up for a challenge, but you don’t want to look too much into outside stuff,” Painter said. “Just control what you can control and do the day-in and day-out stuff. Put the work in. Put your head down and grind. Learn from the mistakes and the failure. That’s the biggest part.”

During his time in Triple A, Painter ditched his splitter, added a circle change, cleaned up some mechanics to help his command, and decided to start throwing the ball with conviction. “Rip it,” as he said. That has helped the velocity and ride on his fastball. He also focused on getting ahead in counts.

“I had a lot of things I needed to straighten out,” he said. “It seemed every walk was coming around to score. I needed to get more early outs so I can stay in the game longer. The biggest thing is trying to be in the zone a lot and force their hand. I did a good job at that tonight. Zero walks is something I’m trying to do every time. I pretty much ripped everything as hard as I could tonight and had that confidence within the zone.”

Mattingly doesn’t need a computer screen to see why Painter has found success lately.

“The biggest thing for me is body language,” Mattingly said. “On the mound, there’s a presence. He’s on the attack. He looks confident. Obviously, the stuff has to be good. None of that matters if you’re not getting anyone out. But for the most part, he’s just on the attack. He’s aggressive.

“He’s starting to show you some windows of what he can be.”

Not that he needed it all, but Painter was supported by one of the Phillies’ best offensive outputs of the season – 15 hits, including a three-run homer by Bryce Harper and a solo shot by Kyle Schwarber, his MLB-leading 38th. The Phils were 7 for 12 with runners in scoring position. They are hitting .333 (65 for 195) with runners in scoring position this month, tops in the majors. That performance has helped fuel a 15-5 record in August and the current eight-game win streak.

The Phils are a season-high 14 games over .500 and have cut Atlanta’s lead in the National League East to three games with 32 remaining, while maintaining control of the second wild-card playoff spot. They are now just two games behind the Cubs for the first wild-card spot.

Getting a win with their No. 5 starter on the mound Saturday night means the Phils can look for a sweep of the Cardinals with their ace, Cristopher Sanchez, on the mound Sunday afternoon. If the Phils get the sweep, it will be their third straight.

The only negative to come out of Saturday night’s game was a couple of nicks and bruises. Luiz Arraez left the game with a hamstring cramp, but he said he’d be good to go Sunday. Red-hot Alec Bohm appeared to aggravate a groin muscle stretching for a ball at first and Derek Hill left the game with neck stiffness. Otherwise, things are really going well for the Phillies. They’re stacking wins. And Andrew Painter is growing up right before everyone’s eyes.