Yankees’ Robinson Cano watches his go-ahead home run off of Orioles reliever Tommy Hunter in the top of the ninth inning. (Doug Kapustin/Reuters)

For the second straight night, the Orioles’ late-inning fate was left to the bullpen Wednesday, and for the second consecutive night, the New York Yankees spoiled Baltimore’s hopes for gaining ground in the American League wild-card race.

The Yankees broke open a tie game with two runs in the top of the ninth inning — including a solo homer by Robinson Cano off reliever Tommy Hunter to open the frame — and then the Orioles’ rally in bottom half of the inning fell just short in a 5-4 loss in front of an announced 20,141 at Camden Yards.

The loss dropped the Orioles (77-68) to a half-game behind the Yankees (78-68) in the chase for the second AL wild-card spot and in the AL East standings with just 17 games remaining in the regular season.

Hunter (4-4) hung a 0-1 change-up over the plate and Cano jumped on it, sending his 27th homer of the season into the center-field stands, just beyond Adam Jones’s outstretched glove. The Yankees added the eventual game-winning run on Lyle Overbay’s two-out single off left-hander Troy Patton, which came two batters after Curtis Granderson’s triple against Hunter.

The Orioles scored against Yankees closer Mariano Rivera in the ninth, and a two-out RBI single by Brian Roberts put the tying run on base. But Manny Machado swung through Rivera’s final fastball as the future Hall of Famer converted his 43rd save of the season and his 79th career save against the Orioles, most against any club.

The Orioles also lost Tuesday night’s game in the late innings, blowing one-run, eighth-inning lead.

Orioles right-hander Scott Feldman, coming off the first shutout of his career in his previous start, held the Yankees to three hits over 72 / 3 innings Wednesday. He left with the game tied at 3 in the eighth.

Feldman, didn’t allow a hit until the fifth inning and recorded his fourth quality start in his past five outings, allowing three runs (two on solo homers by Granderson and Alex Rodriguez).

Trailing 1-0 in the third inning, Chris Davis gave the Orioles the lead with a two-run, two-out double, pulling a ball through a shift on the right side of the infield on a 2-0 pitch.

Davis’s hit, which followed back-to-back two-out singles by Roberts and Machado, gave the Orioles first baseman his 40th double of the season. He’s the first player in Orioles history to record 40 homers and 40 doubles in the same season, a feat accomplished 35 other times in major league history.

The Orioles took advantage of a leadoff double by Danny Valencia in the fourth, when J.J. Hardy laced a 2-2 pitch into the right-center field gap to score Valencia and give the Orioles a 3-1 lead.

Valencia, who entered the game hitting .360 against left-handed pitching this season, was 3 for 3 against Yankees left-hander Andy Pettitte and then added a fourth hit — tying his career-high — with a two-out single off right-hander David Robertson (5-1).

Feldman didn’t allow a hit until Granderson’s leadoff homer in the fifth inning, which cut the Orioles’ lead to 3-2.

Granderson blasted a 2-2 fastball an estimated 422 feet, the 10th homer to land on Eutaw Street this season, breaking last year’s single-season record.

Despite not allowing a hit until Granderson’s blast, Feldman fell behind 1-0 in the first inning. Leadoff hitter Brett Gardner drew a full-count walk, stole second and then scored on a ground out two batters later.

After the walk to Gardner, Feldman retired the next 12 batters he faced.

Rodriguez hit his second homer of the series with two outs in the top of the sixth, taking Feldman’s first-pitch delivery over the grounds crew shed in right field to tie the game at 3.

Pettitte — whose 28 career wins against the Orioles are the most among active pitchers — received a no-decision, allowing three runs on nine hits over 61 / 3 innings with three strikeouts and one walk.

Feldman left after issuing a two-out walk to Gardner in the eighth as Showalter went to the right-hander Hunter to face Rodriguez. Hunter induced a hard-hit line out to center field to end the inning.

— Baltimore Sun