BALTIMORE _ What in the third inning looked like a laugher by the sixth had become a white-knuckler.
The New York Yankees' bullpen, built for such important September scenarios and so good up until the ninth, couldn't quite close it out.
Manny Machado hit a walk-off, two-out, two-run homer in the ninth inning off Dellin Betances to send the Yankees to a stunning 7-6 loss in front of a crowd of 14,377 at Camden Yards on Tuesday night, a gathering that had to wait out a rain delay of 2 hours, 14 minutes before the first pitch.
Few were left when Betances walked Tim Beckham with two outs in the ninth, then witnessed Machado drill a 1-and-0 pitch over the wall in left-center for the game-winner, his second homer of the night and 32nd of the season.
The Yankees (74-64) saw their winning streak end at three and were forced to keep their eyes on the scoreboard late into the night but got bad news about 1:12 a.m. when the Boston Red Sox beat Toronto, 3-2, in the 19th inning at Fenway Park, dropping the Yankees to 31/2 games behind in the AL East.
A six-run third gave CC Sabathia a 6-1 lead but the lefthander, 11-5 with a 3.71 ERA this season, including 2-1 with a 1.89 ERA in his previous three starts, was victimized by the long ball.
An Orioles team that entered the night ranked second in the AL in homers with 212, hit three off Sabathia, the last of which, a two-run shot by Mark Trumbo in the sixth, brought Baltimore (71-68) within 6-5. The O's hit four overall.
Tommy Kahnle took over for Sabathia with one out in the sixth and, though he walked a batter, got out of the inning. David Robertson pitched a perfect seventh and Aroldis Chapman did the same in the eighth.
Sabathia, 7-3 with a 2.81 ERA in 12 previous road starts this season, allowed five runs and eight hits in 51/3 innings.
Orioles righthander Jeremy Hellickson allowed five runs (three earned), two hits and four walks in 21/3 innings.
The swing inning was the third. Austin Romine led off with a single and, after Brett Gardner lined to right, Aaron Judge walked and Starlin Castro was hit by a pitch to load the bases. Didi Gregorius lined a 1-and-1 curveball to right, the two-run single making it 2-1.
Hellickson walked Holliday to load the bases again and O's manager Buck Showalter had seen enough, calling on former Yankees lefty Richard Bleier to face Greg Bird. The first baseman lifted a soft fly to center that Adam Jones dropped for an error (Bird was credited with a sacrifice fly). Todd Frazier's groundout to short brought in another run and Jacoby Ellsbury's two-out, two-run single to center made it 6-1.
Machado's 31st homer of the season in the bottom half brought the Orioles within 6-2 and Jonathan Schoop's two-out blast, his 31st of the season, in the fifth made it 6-3.