BALTIMORE -- Down to their last out against hard-throwing Dellin Betances and the New York Yankees, the Baltimore Orioles turned to a player who's got a knack for delivering in the clutch.
Manny Machado did not disappoint.
Again saving his best for last, Machado hit a two-run homer with two outs in the bottom of the ninth inning for a 7-6 victory on Tuesday night.
"This is a huge game us," said Mark Trumbo, who help fuel Baltimore's comeback from a five-run deficit. "This is the time of the year, if you're going to make a push, we need to do it now. It was a picture-perfect inning. You couldn't ask for anything more."
Betances (3-6) retired the first two batters in the ninth before Tim Beckham walked. Machado then drove a 1-0 pitch far over the center-field wall to provide the Orioles an unlikely victory after New York scored six runs in the third.
"He's a great hitter, obviously," Betances said of Machado. "When you leave a pitch like that to a guy like that, usually he'll punish it, and that's what he did tonight."
It was Machado's second homer of the game and team-high 32nd of the season. He has hit three game-winning home runs this season and five in his career.
"See ball, hit ball. Keep it simple," Machado said. "Keep it very simple and try to get a pitch you can hit."
Jonathan Schoop and Trumbo also went deep for the Orioles, who are in pursuit of a wild-card berth.
Zach Britton (2-0), Baltimore's sixth reliever, worked the ninth.
New York dropped 3 1/2 games behind Boston in the AL East but remains the top AL wild card.
The Yankees were poised to capture their first series at Camden Yards since September 2013, but now to do that they'll have to win Wednesday night in the deciding matchup of the three-game set.
New York starter CC Sabathia allowed five runs and eight hits over 5 1/3 innings. He left with the lead, but was betrayed by the bullpen in his bid to earn his first victory in seven starts against Baltimore since May 2016.
"It was just one of those nights where when we made mistakes, they didn't miss them," Sabathia said.
The start of the game was delayed by rain for 2 hours, 14 minutes. A good portion of the announced crowd of 14,377 stuck around, and for the Orioles fans it proved worth the wait.
New York seemingly took control in the third inning against Jeremy Hellickson. After Didi Gregorius singled in two runs, the Yankees loaded the bases for Greg Bird, who hit a fly to center. The ball plopped in and out of Adam Jones' glove , allowing a run to score, and two batters later Jacoby Ellsbury singled in two unearned runs.
"It's unfortunate we weren't able to add on," Yankees manager Joe Girardi said. "We had some chances and the long ball hurt us tonight. They had four of them."
Hellickson gave up five runs, three earned, and only two hits. But he walked four and hit a batter.
Schoop hit a solo homer in the fifth and Trumbo got Baltimore to 6-5 in the sixth with a two-run drive.
"We chipped away, we chipped away," Trumbo said. "We had our chance there at the end and it worked out."