Nathan Eovaldi gave Yankees manager Joe Girardi exactly what he asked for.

Girardi chose to rest the late-game arms of Dellin Betances, Andrew Miller and Aroldis Chapman in Sunday’s 5-2 win over the Giants, putting pressure on Eovaldi to give the team length in the finale of a 10-game homestand in which all three power pitchers were used often.

Despite not being able to escape the seventh inning, Eovaldi provided the Yankees with 6 2⁄3 solid innings, allowing just two runs, seven hits and two walks. He threw 118 pitches.

“He had a great performance today, and even pitched better than the numbers indicated, I think, giving up the two runs,” Girardi said. “He just got to a pitch count, I was uncomfortable letting him continue, but it’s exactly what we needed.”

Those two runs crossed the plate after Eovaldi exited in the seventh with runners on first and second and two outs. Chasen Shreve was brought in to face lefty Brandon Belt but walked him.

That brought rookie Chad Green on with the bases loaded against Buster Posey, who squeaked a single past Mark Teixeira at first, scoring two runs. Brandon Crawford then grounded out to Teixeira, finishing Eovaldi’s line.

advertisement | advertise on newsday

Perhaps the success came as a result of Eovaldi’s cutter, a new addition to his arsenal used often in his past two starts.

Eovaldi said he wanted to work on the pitch in spring training, but pitching coach Larry Rothschild advised against it. After a demotion to the bullpen, Eovaldi was taught how to throw it.

“I just started working on it before the last start, and it felt good, and I just throw it off the fastball,” Eovaldi said.”

Catcher Brian McCann explained that the cutter has been important because of how he can use it to set up other pitches.

“I think it helps his location on his fastball,” McCann said. “He gets through the baseball better and sets up the splitter.”

Yankees videos

The cutter has also helped Eovaldi avoid the barrel of the bat. He has allowed 19 home runs this season in 110 2⁄3 innings but none in his past two starts.

His tendency to get bitten by the home run has come as a result of leaving pitches up in the zone. Even though he possesses a blistering fastball that touched 99 mph in the first inning, big-league hitters can capitalize if it’s in a bad location.

The deception of the cutter aids his ability to keep the ball in the park, while also cutting his fly ball rate. He induced 11 ground-ball outs and struck out six against the Giants.

“It’s just a grip and trusting it,” Eovaldi said of the cutter. “It feels real comfortable for me to do right now.”