ST. LOUIS – In a season largely filled with frustration and disappointment, the St. Louis Cardinals only needed 24 hours to come up with two of their most thrilling wins this season. And both ended in very similar fashion.

Tommy Edman delivered walk-off hits in back-to-back games, a Tuesday evening showdown and a Wednesday matinée, to help the Cardinals steal a series victory over the San Diego Padres.

On Tuesday, the Cardinals forced extra innings, and Edman delivered a walkoff bloop to left-center for a 6-5 win. On Wednesday, the Cardinals trailed in the ninth inning, and Edman slugged a two-out, two-run home run to cap a 5-4 victory.

“Crazy,” said Edman after his second walk-off hit via Bally Sports Midwest. “A lot more fun when you win. Stayed in the fight for both games and fortunately came out on top in both.”

Both of his walk-off hits came against All-Star relief pitcher and former division foe Josh Hader. They also helped the Cardinals rally back in contests in which they mostly trailed. And Cardinals rookie Masyn Winn ended up scoring on both big hits.

Hader is a tough customer for many, but Edman is now 4-for-8 against him after his two walkoff knocks. The matchup requires a switch-heading Edman to hit right-handed, where his splits have generally fared better compared to hitting left-handed. Hader also challenges hitter to touch his high heat and swing fast.

“You got to stay super short against that guy,” said Edman. “He has one of the best fastballs in the game. I’ve been fortunate to have a little success, and hopefully I can keep that up.”

It seems the baseball scriptwriters had one other consideration in mind: Edman was born and raised in San Diego, providing heroics against his hometown team.

The Cardinals, who fell 20 games below .500 for the first time in decades after Monday’s loss to the Padres, have won two straight to improve to 58-76. Postseason hopes are basically dashed for this season, but Edman says the Cardinals need to keep battling to the end.

“We are still fighting,” said Tommy Edman “These games are important in that we can carry this momentum over.”

Edman now has four career walkoff hits. In addition to his two against the Padres, Edman called game against the Pittsburgh Pirates earlier this year and delivered a game-ending blast last year against the Cincinnati Reds.

The Cardinals open their September slate Friday with a three-game set against the Pirates.