OAKLAND, Calif. — Matt Olson and Mark Canha hit back-to-back homers in the first inning to lead the Athletics over the Yankees, 6-2, on Tuesday night for their fifth win in six games.

“I feel like we’ve been doing that lately,” Olson said. “If we give up a run or two, we find a way to come in and respond. To shut down any momentum is nice to do.”

Olson connected on a two-run shot down the right-field line with two outs in the first off Domingo German (16-3) for his 26th homer, and Canha followed with his 19th on a drive to right-center.

That helped carry the A’s to a win in the first meeting between the teams since the Yankees eliminated Oakland in the wild-card playoff last season. These teams could meet again come the postseason with New York holding the best record in the American League and the A’s moving one percentage point ahead of Tampa Bay in the race for the second wild-card spot.