On the morning of the trade deadline in late July, the St. Louis Cardinals were a .500 team sitting 7 1/2 games outside a playoff spot.

Even with new slugger Nolan Arenado at third base, a season that began with big expectations appeared to be slipping away.

Their next move? While other National League contenders added stars such as Max Scherzer, Kris Bryant and Javier Báez, the Redbirds went for a pair of struggling starting pitchers in their late 30s: Jon Lester and J.A. Happ.

That raised a lot of eyebrows, to put it mildly.

But seven weeks later, look how high these Cardinals have climbed.

Riding the ageless arm of Adam Wainwright atop a graybeard rotation, St. Louis has soared into postseason position with its recent surge. The confident Cardinals hold the second NL wild card by one game over San Diego heading into a pivotal three-game home series against the Padres this weekend.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

"There's still something to be said for wisdom," manager Mike Shildt explained.

After scoring 25 runs in a three-game road sweep of the New York Mets, the Cardinals (76-69) have won five straight and seven of eight.

Muscular outfielder Tyler O'Neill (26 homers, .876 OPS) from Canada has emerged as a dangerous No. 3 hitter between fellow thumpers Paul Goldschmidt and Arenado.

In the absence of injured ace Jack Flaherty, the 40-year-old Wainwright (16-7, 2.88 ERA) has pitched himself into the Cy Young Award conversation during a fountain-of-youth season. The veteran curveballer is 9-2 with a 2.02 ERA in his past 12 starts, going at least six innings every time.

Lester and Happ have hardly been so dominant since arriving. But they've pitched effectively for the most part and taken the ball on turn, providing consistency for an injury-ravaged staff and alleviating some of the pressure placed on a bullpen now hitting its stride following a wild start to the season.

"They've stabilized our rotation, for sure," Shildt said.

St. Louis still has issues at closer — Alex Reyes was an All-Star in July but recently lost the job due to a string of rough outings.

In the lineup, the biggest change has come at shortstop, where rookie Edmundo Sosa has replaced slumping Paul DeJong, an All-Star in 2019.

And with 39-year-old catcher Yadier Molina still anchoring a sensational defense that features five Gold Glove winners (including Wainwright), the rangy Cardinals lead the majors in defensive runs saved, according to The Fielding Bible.

"Great defense might not be the sexiest thing, but it helps you win a lot of games," reliever Andrew Miller said. "In a lot of ways, we should be thankful it’s been a long season because it’s given us time."

After falling a season-worst four games under .500 on June 27, the Cardinals are putting their winning pedigree on display when it counts in September. Their 11-inning victory Tuesday night in New York vaulted them into postseason position for the first time since they clung to a slim lead in the NL Central on May 30.

St. Louis was 3 1/2 games out of the second wild card on Sept. 7, with three teams to pass. Now, the Cardinals control their own fate as they chase a third consecutive playoff appearance and 15th in the past 22 years.

"We do the little things that allow us to be able to compete," Shildt said. "We also have a mindset that we expect to play October baseball."

Strong baserunning. Sound fundamentals. The Cardinal Way.

"We’ve had a lot of moving parts to this club," Shildt said. "But we haven’t lost any of that confidence at all in what we’re doing."

"It's just about consistency," he added. "There's a mentality and expectation that we're going to get it done."