It couldn’t last forever.

Eventually, the Yankees’ offense was going to settle down. Eventually, a team would be able to keep Gary Sanchez in the park. And eventually, someone would snuff out the fuse on these Baby Bombers, even if just for a little while.

Despite a rotation decimated by injury, Kevin Gausman and the Orioles were finally able to shut down a Yankees team that came into Sunday having scored 37 runs in its last four games, all victories. Instead, the Yankees got nothing, Sanchez — gasp — didn’t hit a home run, and they lost, 5-0, to their division rivals at Yankee Stadium. Steve Pearce and Mark Trumbo both went deep to contribute to the Orioles’ major league-leading 204 homers. (Sanchez still went 2-for-4 with a double.)

Gausman pitched seven innings, allowing seven hits with a walk and nine strikeouts.

And though they got on base, the Yankees couldn’t do much with it, wasting a second straight strong performance from CC Sabathia. For six innings, the 36-year-old was downright vintage Sabathia (in result, that is, not execution). Hardly the overpowering pitcher of yore, Sabathia instead stymied the hard-hitting Orioles with a steady diet of cutters, sliders and the occasional well-placed fastball. No Oriole advanced past second base until the sixth.

Sabathia’s most costly error came to lead off that inning — his 74th pitch of the afternoon, a 92 mph sinker to Steve Pearce, ended up in the leftfield seats to give the Orioles a 1-0 lead. Manny Machado singled one batter later, but Sabathia coaxed a groundball out of Trumbo, good for the inning-ending 5-4-3 double play. He’d get into trouble again in the seventh, allowing a one-out single to Jonathan Schoop, a two-out single to Nolan Reimold and a four-pitch walk to Hyun Soo Kim, which ended his day.

Sabathia left the game with a standing ovation, but ended the day with a loss. With the bases loaded and two outs, reliever Adam Warren went 2-and-2 on Pearce, who again made the Yankees pay. He singled to the left side of the drawn-in infield to score two and make it 3-0. J.J. Hardy popped out to the catcher in foul territory to end the inning. The Orioles added on in the eighth, on Trumbo’s two-run homer off Ben Heller, his league-leading 40th of the season.

Sabathia (8-11) pitched 62⁄3 innings, allowing three runs on six hits with eight strikeouts and two walks.

The Yankees’ only real threat came in the fourth. Sanchez led off the inning with a hard-hit single to center, but, in a rare rookie miscue for him, he got tagged out at third trying to stretch on Mark Teixeira’s single. Didi Gregorius singled, and Starlin Castro reached on a fielders’ choice, but Brian McCann struck out to quash the threat and keep the game scoreless.