Jeff Curry-USA TODAY Sports

Nolan Gorman hit a walk-off two-run homer in the ninth inning to lift the St. Louis Cardinals to a 5-3 victory over the visiting Arizona Diamondbacks on Monday night.

Lars Nootbaar drove in two runs and Paul Goldschmidt also went deep for the Cardinals, who snapped a four-game losing streak.

St. Louis starting pitcher Lance Lynn allowed three runs on seven hits and three walks in five innings. He struck out seven.

Ryan Helsley (2-2), the fourth arm out of the Cardinals' bullpen on Monday, pitched a scoreless ninth inning to earn the victory.

Eugenio Suarez went 3-for-4 with two RBIs for the Diamondbacks, who lost for the fourth time in six games.

Arizona starter Brandon Pfaadt allowed two runs on two hits and three walks in 5 1/3 innings. He struck out four.

Reliever Ryan Thompson (0-1) took the loss.

Arizona took a 2-0 lead in the second inning and nearly struck for more.

Joc Pederson hit a leadoff double and scored on Suarez's single. Lynn hit Gabriel Moreno with a pitch and walked Jake McCarthy to load the bases.

After Kevin Newman struck out, Ketel Marte hit a sacrifice fly. Corbin Carroll reached on an infield single to reload the bases, but Lynn struck out Lourdes Gurriel Jr. to escape further damage.

The Diamondbacks increased their lead to 3-0 in the fifth inning. With one out, Christian Walker walked, took second on Pederson's single and scored when Suarez bounced a ground-rule double over the left field wall.

The Cardinals cut their deficit to 3-2 in the sixth inning. Masyn Winn, Michael Siani and Brendan Donovan drew walks before Nootbaar hit a two-run single.

Goldschmidt tied the game at 3 with his solo home run in the seventh inning. He led off the ninth with an infield single off Thompson to set the stage for Gorman's first-pitch homer off Kyle Nelson.

More must-reads:

TODAY'S BEST
Ex-teammate of Shohei Ohtani placed bets with same illegal bookmaker as interpreter 
Former Rams first-round pick retires from NFL after 11 seasons
Insider provides major injury update on Celtics' Kristaps Porzingis
Watch: Bruins strike first in Game 6 with incredible backhand goal
Dodgers make series of moves involving notable players
Giants rookie CF to undergo season-ending labrum surgery
Hurricanes not expected to re-sign defenseman, center
Paul Skenes makes incredible Wrigley Field history in second-career MLB start
Maple Leafs tab former Stanley Cup winner as new head coach
NFL insider expands on competition between Steelers QBs Russell Wilson, Justin Fields
NFL sets outrageous prices for Eagles-Packers Brazil game
Scottie Scheffler shoots improbable 66 after warming up for PGA Championship in a jail cell
Nuggets star has worrying comment about latest injury
Broncos 'very unlikely' to bring back former NFL interceptions leader
Greg Olsen offers broadcasting advice to Tom Brady
Yankees' Juan Soto reacts to Hal Steinbrenner contract talk
Mets star has theory about closer Edwin Diaz's recent struggles
Scottie Scheffler arrested, still makes PGA Championship tee time
Timberwolves chew up Nuggets to force Game 7
Rangers secure spot in conference finals after stunning third-period comeback over Hurricanes

Want more sports news?

Join the hundreds of thousands of fans who start their day with Yardbarker's Morning Bark, the best newsletter in sports.