The Yankees were hitless in 10 at-bats with runners in scoring position Tuesday when DJ LeMahieu came to the plate with the score tied in the bottom of the ninth and Cameron Maybin on second base.

They couldn’t have asked for a better option, because LeMahieu has been deadly in those types of situations this season and he came through again with the game-winning hit in the Yankees’ 5-4 comeback win over the Mariners in The Bronx.

“DJ does what DJ does,’’ manager Aaron Boone said of the second baseman, who is hitting an incredible .500 (14-for-28) with runners in scoring position this year and now has 16 RBIs in those spots.

None was more important than Tuesday, after the Yankees entered the bottom of the ninth trailing the Mariners 4-2 before Gio Urshela tied the game with a two-run blast to center on an 0-2 pitch from former Met and Yankee Anthony Swarzak.

Maybin followed with a single and a stolen base, and after Brett Gardner whiffed, LeMahieu delivered against left-hander Roenis Elias.

“I was trying to get the ball up the middle there and not try to do too much,’’ LeMahieu said. “[Urshela] hitting that homer gave us new life there. Once we tied it up, you kind of got the feeling we’re gonna win this game somehow.”

LeMahieu took care of the “somehow” with his second hit of the night, as Maybin just beat Jay Bruce’s throw home from right.

It was LeMahieu’s second hit of the night and he reached base four times thanks to two walks.

The singles extended his hitting streak to nine games and LeMahieu is 16-for-34 with seven runs, four doubles, nine RBIs and six multi-hit games during that stretch. Missing three games in the middle of the streak after he fouled a ball off his right knee April 28 in San Francisco hasn’t slowed him down.

For now, LeMahieu remains in the leadoff spot, though that could change whenever the Yankees get healthy, with Aaron Hicks (lower back) closer to a return than anyone else on the injured list.

Though LeMahieu has just one homer after hitting a career-high 15 a year ago while with the Rockies and playing half his games at hitter-friendly Coors Field, his OPS is .844 in 31 games this season. He finished with an OPS of .749 with Colorado in 2018.

“There’s no secret,’’ LeMahieu said of hitting well even after leaving Coors. “It’s not a surprise to me because I’m not doing anything differently. I never really hit home runs, so I wasn’t worried about not playing in Colorado. But the back-and-forth from Colorado and the thin air is harder than people think. The ball does different things depending on where you are and I think not having to deal with that has helped me.”