BALTIMORE -- In Baltimore, the fans like to call it "Orioles Magic" when the home team rallies for a late victory.

Those comebacks are even sweeter against the New York Yankees.

Adam Jones hit a go-ahead three-run homer in the eighth inning to lead the Orioles to a 5-3 victory over the Yankees on Wednesday night.

Jones' homer off New York right-hander Shawn Kelley (2-4) came four batters after second baseman Jonathan Schoop tied the score with a solo shot off right-hander Dellin Betances.

Baltimore won both games of the shortened series after Tuesday's matchup was postponed because of rain. The Orioles extended their lead to eight games over New York in the American League East, where they also hold a 30-19 record.

"We knew we were going to have try to be competitive in the division," Orioles manager Buck Showalter said. "So far, so good. It's tough. We talked about getting better at home, which is something we've been able to get better at."

Schoop has a team-best four home runs against New York this season and 11 this year. Jones' homer was his 23rd of the season.

"When we're down by one we always feel we're just one pitch away," Jones said. "So that happened and once we tie the game all the marbles are up. First one to score one wins."

Darren O'Day (4-1) pitched a scoreless eighth inning and left-hander Zach Britton allowed a run on a fielder's choice to third baseman Chase Headley in the ninth but still picked up his 25th save for Baltimore (69-50).

Yankees right-hander Michael Pineda came off the DL from a right shoulder muscle injury to start against the Orioles. It was also his first major league game since April 23 when he was suspended for illegally using pine tar.

Pineda was effective, allowing one run and two hits with four strikeouts in five innings and 67 pitches.

"I feel pretty good," Pineda said. "I'm happy to be back with the team and pitching."

Yankees manager Joe Girardi was ejected in the seventh inning for arguing with home plate umpire Gerry Davis after second baseman Stephen Drew was called out for running beyond the baseline on a dribbler to first.

"Gerry was wrong. Gerry got fooled," Girardi said. "The catcher was on the right side of the line. The first baseman was on the left side of the line. He said the runner was outside the line. The runner was not outside the line."

Yankees catcher Francisco Cervelli hit his second homer of the season for New York (61-58).

Orioles right-hander Chris Tillman had another effective outing with nothing to show for it. He allowed two runs and five hits with three strikeouts in seven innings. Tillman has not allowed more than three runs in his past 13 starts.

"I like way this thing's turning right now," Tillman said. "We come and show up every day, ready to play. We've always been good at waiting guys out. That's what they do. As pitchers we know that already. You get ahead, it's the most important and once you do that, you're normally in pretty good position to do what you need to do."

Baltimore is now 58-25 when it homers in a game.

The Yankees had three left-handed batters and three switch hitters in the lineup against Tillman. However, it was the right-handed Cervelli who gave them a 2-0 lead with a two-run homer in the third inning.

New York has homered in 14 of its past 18 games.

Pineda retired the first 12 batters he faced before allowing a leadoff double to designated hitter Nelson Cruz in the fifth inning. After first baseman Steve Pearce hit a bloop single, Cruz scored on a sacrifice fly by shortstop Ryan Flaherty that cut the margin to one.

Despite the setback, the Yankees still believe they have a playoff run left in them.

"I still feel like we can get on a good streak," Betances said. "We haven't hit that streak yet. But if we do, things will work our way. We got to win some series here. Today was a tough one for sure."

NOTES: Orioles 3B Manny Machado was officially placed the 15-day disabled list Wednesday, retroactive to Tuesday, with a sprained ligament in his right knee. ... The Orioles recalled INF Cord Phelps, 27, from Triple-A Norfolk to provide more depth. ... Yankees RHP Masahiro Tanaka threw 10 fastballs on flat ground before the game. Both Tanaka and manager Joe Girardi expressed optimism that he could return to the rotation this season.