(TSX / STATS) -- OAKLAND, Calif. -- The series looked like a mismatch from the outset, with the brawny New York Yankees visiting the error-prone, cellar-dwelling Oakland Athletics.

But looks can deceive.

In fact, it was the Athletics who completed a surprising four-game sweep on Sunday with a 4-3 win at a sweltering Oakland Coliseum amid 90-degree heat.

Khris Davis' two-run homer, his 18th of the season, broke a 2-2 tie in Oakland's four-run third inning. Sean Doolittle earned the save, and Jharel Cotton (4-7, 5.40 ERA) gave the kind of quality start the A's needed against the high-powered Yankees.

The A's are tough at home with a 22-13 record, but horrendous away at 9-25.

"This feels really good," Doolittle said of the sweep. "To put four games together against a team that's that good, one of the best teams in the American League, to come away with a four-game sweep is really big for us."

Now the A's will look to keep bashing the big boys when they open a four-game set at home against American League West-leading Houston on Monday.

After missing more than a month due to inflammation on his rotator cuff, Yankees closer Aroldis Chapman returned on Sunday, and retired the side in order in the eighth.

"They wanted me to go out there and pitch an inning, regardless of the situation in the game," Chapman said, using an interpreter.

The Yankees' Matt Holliday returned after being scratched on Saturday due to allergy symptoms and crushed a solo home run in the second inning, his 14th of the year.

Davis described the sweep as a "confidence-boost for sure, just because they're a great team on the other side. They've got a lot of power guys. We just battled and battled, and it just showed how relentless we can be."

New York dropped its sixth consecutive game and completed a disappointing West Coast trip 1-6.

The Yankees were swept for the first time this season, joining the rest of the American League in that department.

But Yankees manager Joe Girardi doesn't sound worried about his team.

"I don't look at things in a snapshot," Girardi said. "I look at how you've played over the course of a season and we've really played well, and it's a very talented group."

Cotton, who entered the game on a four-game losing streak, allowed six hits and three earned runs, struck out six and walked one.

It marked his second longest start of the season. He threw 103 pitches, and could have thrown a few more.

"Towards the end I wanted to win for the team so badly I just wanted to pitch as long as I can go," Cotton said.

Cotton described the outing as a way to build momentum. He said A's regular catcher Stephen Vogt, who served as the designated hitter on Sunday, advised him to attack the Yankees' hitters and not to nibble because they'll just "foul you off."

The A's jolted Yankees rookie right-hander Luis Cessa (0-1), making his first start of the season, in the third to take a 4-2 lead. Davis had the telling blow, a prodigious shot to center -- just his second home run in his last 19 games.

Josh Phegley started the uprising with a single, and Matt Joyce and Pinder followed with back-to-back doubles, the latter one tying the game.

Cessa held the A's without a hit in the first two innings, but wound up allowing five hits and four earned runs over four innings.

Holliday opened the scoring with a shot to center to lead off the second. Aaron Judge tacked on his 53rd RBI of the season in the third, scoring Brett Gardner, who doubled. Holliday sat out Saturday's game suffering from allergy symptoms.

NOTES: Before rejoining his teammates in Oakland, New York LHP Aroldis Chapman had a rehab outing with Double-A Trenton on Friday. Chapman has seven saves in eight tries this season. ... Yankees top prospect SS Gleyber Torres, who has been sizzling at Triple-A Scranton, has been placed on the 7-day minor league disabled list with a hyperextended left elbow. Torres will undergo more evaluation on Monday. ... The A's fell to 4-12 on replay challenges this season after CF Jaycob Brugman's out call at second base was confirmed in the fourth inning on an attempted stealing. ... The 90-degree game-time temperature was the hottest for an A's home start since June 20, 2008. ... The Yankees (38-29) have lost a season-high six consecutive games, the longest current losing skid in the American League. Only National League teams Arizona and Los Angeles have not been swept this season.