The Orioles got another home run from Chris Davis, his 49th of the season, but it wasn’t enough against the Yankees, who rallied for four runs in the eighth inning Tuesday to beat Baltimore. (Patrick Semansky/AP)

With games against fellow playoff contenders more magnified and leads against them more precious than ever, the Baltimore Orioles failed to hold onto a three-run, fifth-inning cushion against the New York Yankees on Tuesday night.

The Yankees hit three homers, including two by Alfonso Soriano, and scored six straight runs, sending the Orioles to a difficult-to-digest 7-5 loss in front of an announced 25,897 at Camden Yards.

With the loss, the Orioles (77-67) are now just a half-game ahead of the Yankees (77-68) for third place in the American League East standings and the chase for the AL’s second wild-card spot with 18 games left in the regular season.

The Orioles — who had won six straight against the Yankees at home — also blew an opportunity to pull within a half-game of the second AL wild card spot after the Tampa Bay Rays lost 2-0 to the division-leading Boston Red Sox.

The Orioles led 4-3 heading into the eighth inning before the Yankees rallied for four runs, three of which came against rookie right-hander Kevin Gausman, who was pitching his second inning in his eighth career relief appearance.

After retiring the Yankees in order in the seventh, striking out Lyle Overbay and Brett Gardner along the way, Gausman (2-5) allowed three straight hits to open the eighth.

After Alex Rodriguez doubled to open the inning, Robinson Cano hit a single up the middle to knot the game at 4. Soriano then tagged a 97-mph fastball from on a 0-1 count into the stands in right-center, chasing Gausman from the game. Two batters later, former Oriole Mark Reynolds laced an RBI double down the left-field line off Francisco Rodriguez to give the Yankees a 7-4 lead.

Earlier, the Orioles finally broke through against Yankees right-hander Ivan Nova — who had pitched complete-game wins in both of his previous starts against them — with a four-run fifth.

First baseman Chris Davis launched his 49th homer of the season, a two-run blast to center field, to cap the inning. Davis’s homer tied him with Frank Robinson (1966) for second on the Orioles’ single-season home run list, one shy of Brady Anderson’s club record set in 1996.

Nova tossed his first career shutout in his previous start against the Orioles on Aug. 31 and entered with a 1.52 ERA in three appearances against them this season. But the Orioles quickly erased a 1-0 deficit in the fifth inning.

After J.J. Hardy and Brian Roberts opened the frame with back-to-back singles, No. 9 hitter Henry Urrutia hit a slow grounder to shortstop Eduardo Nunez. Nunez’s throw to first was wild, allowing Hardy to score and putting runners at second and third.

— Baltimore Sun