Harrison Bader of the Yankees reacts after his eighth-inning three-run home run...

Harrison Bader of the Yankees reacts after his eighth-inning three-run home run against the Orioles at Yankee Stadium on Monday. Credit: Jim McIsaac

The Yankees got no semblance of perfection Monday night, the evening Domingo German returned to the mound after his historic performance in Oakland last Wednesday. German didn’t go deep into the game, his team squandered multiple chances against a division rival, and the postgame fireworks errantly went off in the seventh.

But the Yankees don’t need perfection if they’re going to fight their way into the playoffs. They just need “good enough.”

And Harrison Bader’s majestic home run in the eighth? That was plenty good.

Bader’s 415-foot three-run homer, coupled with a typical shutdown performance by the bullpen, was enough for the Yankees to come back from a three-run deficit and beat the Orioles, 6-3, at Yankee Stadium.

Bader’s seventh homer broke a tie at 3. It helped the Yankees get closer to their goal of overtaking the Orioles for the first wild-card spot; they moved within three games of Baltimore with three games left in this series.

“It feels like a good win — summer, hot, Fourth of July, energetic, awesome crowd,” Aaron Boone said. “[Us] falling behind and the way we’ve been grinding, just to see us have those kinds of at-bats, the bullpen doing their thing. I don’t know [if it was] bigger [than other wins], but it was a good win.”

Anthony Volpe and Kyle Higashioka hit back-to-back homers with two outs in the fifth to bring the Yankees within 3-2. Volpe (two hits) had his sixth multi-hit game in the last eight games and is 15-for-30 in that span.

Nick Ramirez, Ian Hamilton, Tommy Kahnle and Clay Holmes combined to allow no runs and three hits in 4 2⁄3 innings, improving the bullpen ERA to a league-best 2.83.

German, who was uneven but not disastrous coming off his perfect game, was showered with affection by the fans but lasted only 4 1⁄3 innings, allowing three runs (two earned) and nine hits with no walks and five strikeouts.

The Yankees had only two hits before the back-to-back homers as they struggled against Tyler Wells, but they feasted when Mike Baumann replaced him to start the seventh.

Isiah Kiner-Falefa and Volpe hit back-to-back singles and Higashioka laid down a perfect sacrifice bunt to move them into scoring position. Baumann was replaced by  righthander Yennier Cano, who got DJ LeMahieu to hit a comebacker that resulted in Kiner-Falefa being retired for the second out. With an 0-and-2 count on Gleyber Torres, Cano yanked a very wild pitch into the lefthanded batter’s box and Volpe slid home headfirst to tie it.

With none out in the eighth, Giancarlo Stanton singled off Cano and Anthony Rizzo singled off lefthander Danny Coulombe. That brought up Bader, who — after showing bunt and taking a strike, then again squaring around as Coulombe whirled toward second on a fake pickoff attempt — blasted a hanging sweeper.

“We’re right in the middle of the season and we’re right in the thick of it,” Bader said. “I would have been equally happy getting that bunt down . . . It’s funny how the game works out. It just shows you: You never know what the next pitch holds. You never know what’s going to happen one swing away.”

No one typified baseball’s unpredictability more than German, who, after a perfect first inning, proved eminently hittable.

He allowed three straight singles in the second and gave up all three of his runs by the fourth. He was removed with two on and one out in the fifth in favor of Ramirez, who escaped the jam by striking out Ryan O’Hearn and getting Ramon Urias to hit into a forceout.

That didn’t mean fans couldn’t celebrate German if they wanted to. About a half-hour before first pitch, as he ran out to throw to Higashioka in the outfield, the still-assembling crowd cheered and he thanked them, his glove outstretched in the air. When he walked off in the fifth, they again cheered loudly and German applauded them right back.

“It means a lot,” he said. “It was great to see all the fans showing support like that . . . It’s more encouragement to give the best I can.”

More Yankees headlines

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME