BOSTON — The Yankees felt that Sunday’s game against the Red Sox was in danger of getting away from them. Manager Joe Girardi wanted to prevent that and called on Aroldis Chapman. He came in to whiff Brock Holt on three fastballs — called strikes at 98, 99 and 100 mph — to end the inning.

It sounds familiar, but it was anything but that. This was the sixth inning of the Yankees’ 5-1 loss at Fenway Park.

When Girardi stripped the struggling Chapman of his closer responsibilities Saturday, he said the goal was to restore the lefthander’s confidence by using him in lower-leverage situations and said he could be used in any inning or situation. Chapman, in the first year of a five-year, $86-million contract, hadn’t pitched this early in a game since 2011, when he was with the Reds.

“When you to go out there to pitch, you have to have the same mentality [as closing],” Chapman said through an interpreter. “I have the same mentality. The only difference is I went into the game a little earlier. But the mentality is the same: go out and do your job. It was definitely a positive to strike somebody out like that.”

Chapman also worked a scoreless seventh. He issued a leadoff walk to Mookie Betts, who advanced to second on a wild pitch and third when he deked rightfielder Aaron Judge into a nonchalant throw on a flyout. But Chapman was able to keep him there by striking out Rafael Devers — who had victimized him with a tying home run in the ninth inning the previous Sunday — to end the inning.

The results were good, but all is not cured with Chapman. He didn’t allow a run — unlike his previous four outings — but he still isn’t getting swing-and-miss strikes. His last pitch, a high fastball to Devers, was his only one.

“Today I didn’t allow a run, so that’s a positive,” he said.

advertisement | advertise on newsday

Asked how he felt about Chapman’s appearance, Girardi replied, “Pretty good.”

He added, “He came in and did his job. You walk the leadoff hitter in the seventh . . . but he ends up getting out of the inning. So I thought he did a pretty good job.”

Girardi does not plan to keep things this way, although he will continue this until Chapman returns to form. He has a cushion in David Robertson and Dellin Betances but wants Chapman back in the closer role as soon as possible.

The Yankees hope this was a first step.