As the Yankees’ bullpen struggled in recent weeks, Dellin Betances, as dominant as ever, was a notable exception.

That ended Thursday night.

In no way was the stud reliever solely responsible for a brutal 10-5 loss to the Angels at the Stadium, but a sharp Betances certainly would have helped. He was far from that, allowing an inherited runner to score and giving up two runs of his own in a four-run seventh that turned a 5-4 lead into an 8-5 deficit. The Yankees had led 5-1.

“Just one of those nights,” he said, aptly summing up the evening for his club. “Off-speed stuff wasn’t as sharp as I wanted it to be, fastball command wasn’t as good as it was [Wednesday] night. One of those days.”

Betances came in with a 0.40 ERA this season, having allowed one earned run in 22 1⁄3 innings.

The Yankees (39-31) committed three errors, one of which opened the floodgates for the Angels’ big inning. “When you’re going bad and you’re not doing the things that you need to do to win, this is what happens,” Joe Girardi said. “There’s a number of things we need to clean up.”

advertisement | advertise on newsday

The Yankees took a 5-1 lead in a four-run second highlighted by Aaron Judge’s 25th homer, a three-run shot into Monument Park, but then stopped hitting. Before Chris Carter singled with two outs in the ninth, 15 straight had been retired.

Luis Severino (5-3) allowed the Angels to slowly get back in it and took a one-run lead into the seventh. That half-inning produced all kinds of ugliness.

Cliff Pennington started the inning with a single to right and Cameron Maybin, who had homered on Severino’s second pitch of the game, followed with a sharp grounder to second baseman Starlin Castro. The ball seemed to hit something and skid suddenly to Castro’s right, and the error put runners at the corners with none out.

“Right when he hit the ball, I thought in my head right away, ‘OK, that’s a double play,’ ” Castro said. “And then it moved. I just tried to block the ball and keep it in front of me so at least we could get one out, but it didn’t happen the right way.”

Girardi called on lefthander Chasen Shreve to face the lefthanded-hitting Kole Calhoun, whose sacrifice fly tied it at 5.

Yankees videos

With Albert Pujols at the plate and Betances pitching, Maybin stole second and went to third when Gary Sanchez threw high and into centerfield for an error. Betances fell behind 3-and-1 before Pujols punched an RBI single to right to make it 6-5, further quieting the crowd of 43,051.

Betances walked Yunel Escobar and, with Luis Valbuena up, unloaded a fastball that sailed clear to the backstop, with the wildest of wild pitches moving the runners to second and third.

“Right when I was about to throw the pitch, I realized that this could be bad because Gary, it looked like he was waiting curveball and I was throwing a fastball,” Betances said. “So I tried to do my best and not kill him there, so I threw it as hard as I can.”

Betances struck out Valbuena, but Andrelton Simmons jumped on a first-pitch curveball and lined a two-run double to left to make it 8-5.

Severino entered the game unbeaten in his previous eight starts, going 3-0 with a 2.40 ERA in that stretch. He was charged with six runs (five earned) and allowed eight hits in six innings.

advertisement | advertise on newsday

“That’s baseball,” Judge said. “You’re going to have your ups, you’re going to have your downs, you’re going to have your moments when you have a 10-game winning streak, you’re going to have those moment when nothing’s going your way. It’s part of baseball. It’s just how we respond from it that’s going to be the difference.”