Aroldis Chapman had little control before the delay. Kirby Yates demonstrated even less after it.

And so a somewhat surreal night of baseball — one that bled well into Tuesday morning — concluded with the Yankees taking a 9-6 loss to the Rangers in front of 32,914 at the Stadium.

About 50 of those fans were left to watch Yates’ implosion when play resumed at 2:15 a.m. Tuesday after a 3-hour, 35-minute rain delay.

Yates, who came on with one on and none out in the ninth and the Yankees leading 6-5, hit three batters in the inning and allowed two-run singles by Adrian Beltre and Elvis Andrus as the Rangers extended the American League’s best record to 50-27.

Yates, who entered the game with a 3-and-1 count on Shin-Soo Choo, struck out Choo looking but hit Ian Desmond in the back and Nomar Mazara in the left ankle, each time on a 1-and-2 pitch, to load the bases. He then got ahead of Beltre 0-and-2, but on yet another fateful 1-and-2 pitch, he allowed a two-run single to left.

Yates hit Prince Fielder in the right elbow with an 0-and-2 pitch to reload the bases, got ahead of Roughned Odor 0-and-2, threw three balls and retired him on a shallow fly ball to leftfielder Brett Gardner, who cut in front of Jacoby Ellsbury to make the play. But Andrus blooped a two-run single to right on the first pitch to him for a 9-6 lead.

advertisement | advertise on newsday

Ryan Rua finally struck out to end the inning. The top of the ninth began at 10:36 p.m. and ended at 2:33 a.m.

Said Yates, “It’s very frustrating, especially the fact that I had two strikes on every single guy I hit. I mean, we were one pitch away from winning a baseball game; instead we lose by three runs. It doesn’t feel good. It’s not something I’m proud of, but it happens. Tomorrow’s another day. Come back and win tomorrow.’’

In the bottom of the ninth, righthander Sam Dyson allowed an infield single by Starlin Castro and a one-out walk to Chase Headley, bringing Aaron Hicks to the plate as the tying run. But Hicks grounded into a forceout at second and Ellsbury lined to left to end it at 2:44 a.m. as Dyson picked up his 16th save.

Now, to backtrack much, much earlier.

The Yankees led 6-5 when the Rangers came to bat in the top of the ninth with rain pounding the field, as it had been for at least the previous three innings.

Yankees videos

Chapman, not appearing very comfortable in the wet conditions, walked leadoff man Robinson Chirinos and fell behind Choo 3-and-1.

“It was tough out there today,’’ Chapman said. “Couldn’t really get a good grip on the ball . . . It was very wet out there. I was trying to find a way that would allow me to do my job. I was doing the best I could.’’

Joe Girardi came out of the dugout and discussed the situation with the umpires, appearing to want a delay, though he said afterward that wasn’t the case.

“I didn’t ask him to stop the game,” he said. “To me, the game should have been stopped earlier than that. We played in horrible conditions . . . I don’t think we should have been out there in the eighth, maybe not even the seventh. It’s hard for me to understand what happened tonight, how it got to this point. But it did and we lost.”

Crew chief Paul Nauert called for the tarp just a few moments later.

advertisement | advertise on newsday

And the rain continued . . . and continued . . . and continued.

“This shouldn’t happen,’’ Girardi said. “And I wouldn’t have a problem starting the next night [if the rules allowed for a suspended game that could be resumed]. I think that’s better than burning your closer and doing what they did. But it’s the rules and I think it should be looked at because it just doesn’t make any sense to me.

“You’ve got guys slipping all over the outfield. When does health become a concern? It was a concern. The infield was soft when we went back out there. But no one’s going to feel sorry for us, and I don’t expect anyone to, but I thought it was a poor decision . . . I’ve never been involved where you’ve waited 3 ½ hours in the middle of the game.’’

Nauert told a pool reporter: “As the inning went on and Chapman had issues gripping the baseball, the mound was actually still in very good shape, but it was brought to our attention that home plate was under water, first base was starting to puddle up because it had now taken on a heavy rain with more water, and that was our decision then to stop the game.”

How long would he have allowed the delay to last? “I think our intention was to try and finish that game,’’ Nauert said. “You’ve got to give both teams an equal, fair opportunity. We were going to wait as long as we could.”

advertisement | advertise on newsday

How much did the situation (a one-run game with a runner on first in the ninth inning) affect the decision? “I think a lot of things dictated it,’’ he said. “You’ve got to make it fair for both teams. Our job is to try to get the game in. Just to cut it short for rain is not something that we’re doing. We take that integrity part of it very seriously.”

As members of the ground crew pulled the tarp on the field, Rangers manager Jeff Banister engaged in a heated discussion with Nauert and the other three umpires. His argument seemed to be that Girardi became interested in a delay only when one of his pitchers couldn’t deal with the conditions.

And those conditions had not been good for about two hours as a steady rain accompanied play the majority of the night.

It was a night in which neither starting pitcher had it as the clubs traded leads in the early going.

Ivan Nova entered the game 5-5 with a 5.18 ERA, including 2-4 with a 6.88 ERA in his previous six games, a stretch in which he allowed eight homers. He allowed four runs and six hits in five innings.

Texas righty Chi Chi Gonzalez, a 24-year-old called up from Triple-A Round Rock because of the spate of injuries to the Rangers’ rotation, allowed five runs and 10 hits in five innings.

The Yankees, who had 15 hits, including three each from Carlos Beltran, Mark Teixeira and Didi Gregorius, went ahead 5-4 in the fifth on Gregorius’ two-out RBI single, and Girardi hoped the bullpen would take it from there.

Lefthander Richard Bleier pitched a perfect sixth before giving way to the power arms in the back end, with the Yankees looking to improve to 13-0 when Dellin Betances, Andrew Miller and Chapman appear in the same game.

Betances struck out one in a perfect seventh, and Teixeira’s second homer in as many days made it 6-4. After he went 147 at-bats without a home run before hitting one in the eighth inning Sunday, this was his second homer in five at-bats.

Miller struck out three in the eighth but allowed Odor’s 14th homer, a one-out shot into the second deck in rightfield that made it 6-5.

Notes & quotes: CC Sabathia, who twisted his right ankle in his previous start, still is slated to take the mound Tuesday night. “He threw his bullpen fine , he’s done everything else fine, but I’m still a little concerned about it,” Girardi said . . . The Cubs and Giants, two clubs in need of bullpen help, again were among the teams with scouts in attendance Monday night.