LOS ANGELES (AP) — Teoscar Hernández singled in the go-ahead run in the ninth inning for his third RBI of the game, and the Los Angeles Dodgers beat the Arizona Diamondbacks 6-5 on Tuesday night.

The Dodgers scored two runs with two outs to salvage a game in which they owned leads of 2-0 and 4-3.

Paul Sewald (0-1) struck out Gavin Lux and Shohei Ohtani before Will Smith doubled to center on a ball that caromed off the wall. Smith scored the tying run on Freddie Freeman’s double to right, handing Sewald his first blown save in 12 chances this season.

Joc Pederson’s solo shot on an 0-2 pitch from Evan Phillips (1-0) in the top of the ninth put Arizona ahead, 5-4.

The D-backs tied the game in the eighth. Gabriel Moreno walked and pinch-hitter Jake McCarthy followed with a bunt single to reliever Blake Treinen, who was slow to field the ball. Moreno scored the go-ahead run on Treinen’s throwing error to second.

In the seventh, Ohtani blasted a two-run drive that lifted the Dodgers to a 4-3 lead. His 27th homer of the season traveled 433 feet to right-center on Japanese Heritage Night. Lux, who drew a leadoff walk from Justin Martinez, also scored.

The sellout crowd of 52,931 responded with cheers and chants of “MVP!” for the two-time AL MVP.

Ohtani fouled a pitch off his right foot leading off the third, flipping his bat as he grimaced in pain. Two trainers and manager Dave Roberts came out to check on him. Ohtani did a small sprint toward first to test out his foot and stayed in the game.

Ketel Marte’s go-ahead RBI single in the seventh gave the D-backs a 3-2 lead.

The D-backs had just two runners on base — both via walk — through three innings. Then they got to Bobby Miller with four consecutive hits in the fourth. Christian Walker’s 18th homer, a 402-foot shot to center, tied it at 2.

It was Walker’s 15th career homer at Dodger Stadium, all since 2018 and more than any other visiting player in that time. He tied Cody Bellinger for the most homers in any player’s first 40 games at the third-oldest ballpark in the majors.

Hernandez’s first two RBIs gave the Dodgers a 2-0 lead. He doubled home Ohtani with two outs in the first. Hernández drove in Smith when he grounded into a fielder’s choice to pitcher Ryne Nelson in the third.

Joe Mantiply started the bullpen game for the D-backs.

TRAINER’S ROOM

D-backs: Placed LHP Jordan Montgomery (right knee inflammation) on 10-day IL, a day before his scheduled start. … Reinstated OF Alek Thomas (strained left hamstring) and C Gabriel Moreno (left thumb sprain) from the IL.

Dodgers: INF Mookie Betts (broken hand) threw and ran. … LHP Clayton Kershaw (shoulder) will throw a bullpen Wednesday and could make his next rehab start soon. … RHP Yoshinobu Yamamoto (strained rotator cuff) is pain-free, but there’s no timetable for him to resume throwing.

UP NEXT

The D-backs had not announced a starter for Wednesday against stellar Dodgers rookie RHP Gavin Stone (9-2, 2.73 ERA), who is coming off a shutout against the Chicago White Sox.

___

AP MLB: https://apnews.com/hub/mlb