OAKLAND, Calif. (AP) - A day that began with ace Sonny Gray being placed on the disabled list didn't get much better for Oakland Athletics manager Bob Melvin.
There was another shaky outing by an Oakland starting pitcher, a defense that committed its AL-leading 36th error and numerous missed opportunities at the plate.
Michael Pineda won for the first time since his opening start this season, Starlin Castro hit a tiebreaking, two-out single in the sixth inning and the New York Yankees beat the A's 5-4 to complete a four-game sweep.
"It doesn't feel good," Melvin said. "I don't know that we could have fought much harder at the end of this game. (We were) ahead by a run and we got our best guys rested in the bullpen. We just couldn't finish it off."
Sunday's loss was a microcosm of the entire series for Oakland.
The A's scored only nine runs in the four games with the Yankees, committed six errors and had only one starting pitcher make it past the sixth inning while falling a season-high seven games under .500.
The news that Gray will have to miss the next two weeks because of a strained trapezius muscle near his right shoulder blade certainly didn't help either.
"Obviously we're frustrated with losing four to the Yankees," said Stephen Vogt, who had three RBIs. "We have a lot of things that can bring us down but right now I think we're doing all right. With the injuries and losing four in a row, it was a tough four-day stretch for us overall."
Brian McCann and Jacoby Ellsbury homered for the Yankees. New York (21-22) completed a 5-2 trip that began in Arizona and is on its longest winning streak since winning seven in a row from June 1-9 last season.
Oakland right-hander Jesse Hahn (1-2) gave up four runs and six hits in 5 2/3 innings, continuing a rough stretch for A's starters who are 3-10 with a 7.08 ERA over the last 15 games.
Pineda (2-5) had been 0-4 with a 5.61 ERA in six starts since defeating Houston on April 6. He allowed three runs and six hits in six innings, struck out six and walked one.
Dellin Betances, Andrew Miller and Aroldis Chapman pitched an inning each to complete a six-hitter. Oakland scored an unearned run off Miller in the eighth after errors by Didi Gregorius at shortstop and Castro at second before pinch-hitter Khris Davis grounded out with the potential tying run at second. Chapman got three straight outs for his sixth save.
New York swept a four-game series for the first time in three years and for the first time at Oakland since 1979.
"We needed to play good baseball on this road trip and we've done that," McCann said.
Melvin applauded Brett Gardner's aggressive running in the sixth when he scored the tying run from second. Second baseman Chris Coghlan fielded Mark Teixeira's infield single in the outfield grass, and his off-balance throw to first was not in time. Gardner rounded third and slid headfirst into home to beat the relay throw from Yonder Alonso. "If we hold it and he keeps on running and gets thrown out, it's not a good play," Melvin said. "It's an aggressive play that he read the throw to first, and now once the throw goes to first, we're probably not going to have a play on him."
Athletics: Right-handed reliever Daniel Coulombe pitched the eighth after getting recalled from Triple-A Nashville. ... Davis will likely DH in Seattle on Monday to give him more time to recover from tightness in his forearm.
Athletics: LHP Rich Hill (6-3) starts at Seattle on Monday. He has a 1.96 ERA over his last six starts.