Brian Cashman pondered the opening month of the season for his club, which brought MLB’s best record into Sunday’s game.

“There’s nothing to make us believe right now we can’t keep that going,” the Yankees’ general manager said in the morning. “Really pleased with how we’ve started out of the gate.”

But there was a stumble Sunday afternoon, a 7-4, 11-inning loss to the Orioles in front of 41,022 at the Stadium.

It was a 4-hour, 37-minute slog that included Bryan Mitchell pitching the ninth and 11th and playing first base in the 10th. With Adam Warren and Tommy Layne unavailable, “we were short on pitchers,” Joe Girardi said. “So I knew I had to maybe do something unorthodox.”

The Yankees tied it at 4 in the ninth on Didi Gregorius’ two-out, two-run single but were unable to complete the job — unlike Friday night, when they stormed back from a 9-1 deficit to win in 10 innings, 14-11.

The Yankees stranded 16 and were 3-for-13 with runners in scoring position. Still, given the way they were playing, having won 14 of 17, some kind of hiccup was inevitable. The loss didn’t overshadow a month in which the Yankees went 15-8, tied with the Orioles for the AL East lead. It’s a world of difference from April 2016, when they went 8-14.

advertisement | advertise on newsday

“I thought we had a pretty darn good April,” Brett Gardner said. “Definitely happy with where we’re at.”

Girardi said of the record: “I think you’d sign up for that.”

The Yankees put runners on second and third with none out in the second and loaded the bases with one out in the third but failed to score each time. They stranded runners at second and third in the ninth after Gregorius’ clutch hit and seemed destined to win it in the 10th, but again left three stranded.

Austin Romine led off with a single and former Mets righthander Logan Verrett made an ill-advised attempt to get the lead runner on Gardner’s sacrifice bunt, leaving both runners safe. Aaron Hicks’ sacrifice bunt put runners at second and third and Greg Bird, hitting in Aroldis Chapman’s spot in the order, was hit by a pitch to load the bases.

With the infield in, Starlin Castro hit a tapper to shortstop J.J. Hardy, whose throw home was in the dirt but dug out by Welington Castillo for the forceout, and Aaron Judge struck out to end the inning.

Yankees videos

“We put a lot of guys on base,” Gardner said. “Just didn’t come up with the big hit. We came up a little bit short.”

After Joey Rickard stole second and Manny Machado was intentionally walked with two outs in the 11th, Mark Trumbo’s RBI single put the Orioles ahead for good. Castillo singled home another run and Chase Headley’s error on the play made it 7-4.

With one out in the ninth and the Yankees down 4-2, Matt Holliday — who hit a walk-off three-run homer into the Yankees’ bullpen in the 10th inning Friday night and homered off the back wall of the Orioles’ bullpen in the first inning Sunday — singled to start the tying rally. Castro grounded into a forceout for the second out, but Darren O’Day walked Judge on five pitches and, with Headley at the plate, was called for a balk by plate umpire Stu Scheurwater. Orioles manager Buck Showalter was ejected after a vehement argument and Headley wound up walking on four pitches.

In came lefthander Donnie Hart, and Gregorius scorched a two-run single to center to tie it.

“I thought we had it but we came up short,” said Dellin Betances, who walked a batter but struck out three in the eighth. “It’s tough to lose this one, but if we keep giving ourselves chances, we’ll be in a good spot.”