OAKLAND, Calif. (AP) One month after a sluggish start dropped them into the cellar of the AL East, the New York Yankees are the hottest team in the majors.
A rejuvenated offense led by red-hot slugger Carlos Beltran has paired with four consecutive strong outings from the starting rotation on the road, and that's all it took to get manager Joe Girardi's club going.
Even Michael Pineda is feeling good these days after ending one of longest droughts of his career.
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 Yankees beat the Oakland Athletics 5-4 to extend a winning streak to five for the first time in nearly a year.
''This was a big four-game sweep for us,'' Girardi said. ''There was a lot of frustration in our clubhouse, whether it was from pitchers or whether it was from position players who were struggling with the bat. Everyone seems to be doing their part now. The vibe is a lot better.''
Brian McCann and Jacoby Ellsbury homered for the Yankees, who swept the four-game series. 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.
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.
''I threw the ball better today,'' Pineda said. ''All my pitches were down. The last couple of starts, I was looking to make adjustments to be better in the game. That's what I'm looking for, to be better all the time.''
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.
All nine of New York's position players reached base. Chase Headley, who was hit by a pitch in the sixth, was the only one without a hit.
New York swept a four-game series for the first time in three years and for the first time at Oakland since 1979.
''We just needed to play better baseball,'' McCann said. ''We needed better situational hitting, better defense, better pitching and we're getting that. We're happy where we're at.''
Stephen Vogt drove in three Oakland runs with an RBI single in the first and a double in the fifth that gave the A's a 3-2 lead.
Brett Gardner scored the tying run from second on Mark Teixeira's infield single in the sixth when second baseman Chris Coghlan fielded the ball 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. Castro followed with his RBI single to put the Yankees ahead. Beltran doubled in Aaron Hicks in the seventh to make it 5-3.
Beltran, subbing at DH for injured Alex Rodriguez, is hitting .353 with 15 RBIs over his last 14 games.
The A's dropped to a season-high seven games under .500.
''It doesn't feel good,'' manager Bob Melvin said. ''I don't know that we could have fought much harder at the end of this game. And that shows that we're not just saying, `Hey look, we're injured.'''
Oakland starter Jesse Hahn (1-2) gave up four runs and six hits in 5 2/3 innings.
McCann homered leading off the second, and Ellsbury hit a two-out solo shot in the third.
Yankees: RHP Luis Severino (right triceps strain) will throw a bullpen session Tuesday and make a minor league injury rehabilitation start later in the week.
Athletics: Sonny Gray was put on the 15-day disabled list because of a strained trapezius muscle near his right shoulder blade. Gray is 3-5 in nine starts with a 6.19 ERA, third-highest in the AL among qualifying pitchers. ... Right-handed reliever Daniel Coulombe pitched the eighth after getting recalled from Triple-A Nashville.
Yankees: RHP Nathan Eovaldi (4-2) will pitch the series opener in New York against Toronto on Tuesday. Eovaldi is unbeaten in his previous five starts.
Athletics: LHP Rich Hill (6-3) starts at Seattle on Monday. He has a 1.96 ERA over his previous six starts.