Nathan Eovaldi looked so sharp his previous time out against the Red Sox. And he looked not so sharp this time out against the Royals.

But it has been that kind of up-and-down season so far for the Yankees righthander through seven starts — bad, mediocre, quality, quality, bad, quality, mediocre, in that order.

It took him 98 pitches to navigate his five innings Thursday night at Yankee Stadium. Eovaldi yielded eight hits and two walks. But for all the traffic jams he created on the bases, he managed to limit the damage to just three runs.

The Yankees hit three homers and the bullpen nailed down a 7-3 victory for Eovaldi.

“Mixed,” Joe Girardi said, beginning his review of his starter’s outing. “I thought he struggled with the split tonight. . . . But he did what he had to to win that game. There were some situations where he got some big outs when he needed to, and that’s one of the reasons we won.”

So Eovaldi’s record rose to 3-2. But his ERA also rose to 4.85.

advertisement | advertise on newsday

“I feel like it’s been good so far,” Eovaldi said. “There are things that I’m doing right and things that I need to work on some more. But there’s a lot of season left and we’ll keep working on it.”

The AL’s hardest-throwing starter at 96.7 mph entering play had location issues. He left that splitter up sometimes when he was ahead in the count.

“The same with the slider and some of the fastballs as well,” Eovaldi said. “I left it too much up and middle of the plate. It’s really frustrating for me. I’ve got to do a better job of getting those pitches down and [getting a] swing and miss.”

Eovaldi, paired with Austin Romine behind the plate for the fourth straight start, escaped a first-and-third jam in the first by getting Kendrys Morales to hit into a 4-6-3 double play. A diving stop by Mark Teixeira wide of first saved Eovaldi a run in the third.

Then in the fourth, Alex Gordon launched a 98 mph fastball over the Yankees’ bullpen and into the right-center bleachers to cut Eovaldi’s lead to 3-1. Christian Colon added a two-out RBI single.

Yankees videos

Gordon delivered a two-out, RBI single in the fifth, and Eovaldi’s lead was now 5-3. That lead nearly disappeared moments later. Salvador Perez made a bid for a three-run homer. But Carlos Beltran hauled it in with a little leap at the rightfield wall.

“I was a little hesitant at first when I saw Carlos going back on it,” Eovaldi said. “But luckily he was able to make the play on it and get us out of that situation.”