LOS ANGELES -- In a seesaw affair that tested both bullpens and nerves, the St. Louis Cardinals clawed back from multiple deficits to defeat the Los Angeles Dodgers 8-6 in 10 innings Wednesday night. The decisive moment came off the bat of rookie Thomas Saggese, who punched a two-strike infield single that scored automatic runner José Fermín, giving St. Louis its first lead of the night in the top of the 10th.

The inning began with Fermín placed on second base per the extra-inning rule. Nathan Church, facing Dodgers reliever Brock Stewart, lined a single to center that advanced Fermín to third. Saggese then worked a full count before sending a grounder to second base, allowing Fermín to race home and break a 5-5 tie. The Cardinals widened the margin on a double by pinch-hitter Joshua Báez, who entered in the eighth inning and later scored on Alec Burleson’s sacrifice fly.

Riley O’Brien, the Cardinals closer, worked a clean bottom of the 10th to secure his 35th save of the season. O’Brien induced a strikeout of Shohei Ohtani, who had already struck out four times in the game, stranding the automatic runner at third base.

Earlier, the Dodgers seized control with a three-run first inning. Freddie Freeman, mired in a 47-game homerless streak, launched a 416-foot blast to center field off Cardinals opener Brycen Mautz. The shot scored Ohtani (who walked) and Tommy Edman (hit by a pitch), snapping Freeman’s drought that dated back to July 3. Mautz struggled with command, walking two more batters and allowing a single to Miguel Rojas as the Dodgers batted around.

Dodgers starter Yoshinobu Yamamoto was nearly untouchable through five innings, retiring the first 15 batters in order. His only blemish was a walk to Fermín in the fifth. The no-hit bid ended in the sixth when Fermín led off with a single. After Church grounded into a fielder’s choice, Saggese launched a two-run homer to cut the deficit to 3-2. Yamamoto finished with seven innings, allowing four runs on five hits while striking out eight.

Los Angeles responded in the bottom half. Mookie Betts crushed a two-run shot off reliever George Soriano, pushing the Dodgers’ lead to 5-2. But the Cardinals chipped away again in the seventh. Leo Bernal, making just his second big league appearance, delivered a two-run homer, his first in the majors, to make it 5-4. The rookie had a two-run single in his MLB debut the previous night.

St. Louis tied the game in the eighth. Báez doubled off reliever Tanner Scott, then scored on a sacrifice fly by Burleson. The Dodgers had a chance to win in the ninth. Teoscar Hernández hit a ground-rule double and advanced to third on a wild pitch by Justin Bruihl (1-1). But pinch-hitter Kiké Hernández struck out, and pinch-hitter Will Smith flied out to end the threat.

The Dodgers, who lead the National League West, have now lost six of their last eight games. Ohtani’s four-strikeout performance marked the first time this season he has fanned four consecutive times in a game. The series concludes Thursday with Cardinals left-hander Quinn Mathews (1-2, 5.03 ERA) facing Dodgers lefty Tarik Skubal (8-7, 2.84).