ST. PETERSBURG, Florida — Khris Davis helped Oakland win another close one.

Davis led off the 10th inning with his major league-leading 42nd homer and the Athletics beat the Tampa Bay Rays 2-1 on Friday night.

“I’ve always said he’s one swing away from winning a game for you,” A’s manager Bob Melvin said. “He’s developed a knack for hitting good pitching and hitting dramatic homers late in games.”

Oakland improved its majors-best record in one-run games to 29-12 and extended its lead for the second AL wild card to nine games over the surprising Rays. Tampa Bay has 16 games left.

The A’s remained 1½ games behind the New York Yankees for the first wild card. The Yankees beat Toronto 11-0.

“We’re competing for a spot. Every game is precious,” Davis said.

Davis’ drive to center off Jaime Schultz (2-1) was his 40th this season as a designated hitter. He joins David Ortiz has the only DHs to have 40 or more homers.

Davis set an Oakland record with his 16th homer in the seventh inning or later.

The A’s had just three hits against nine Tampa Bay pitchers. Blake Treinen (7-2) went two scoreless innings for the win.

Matt Chapman doubled for the first A’s hit with one out in the fourth and scored on Matt Olson’s single.

Tampa Bay tied it later in the fourth when Tommy Pham extended his hitting streak to 17 games with a pop-fly double into shallow center field and crossed the plate on Joey Wendle’s hit.

“They didn’t give us much,” Rays third baseman Matt Duffy said. “A close, hard-fought game.”

Athletics starter Edwin Jackson allowed one run and four hits in five innings.

Reliever Diego Castillo opened the game for the Rays and struck out four over two perfect innings.

Sergio Romo retired all three batters in the ninth in his second appearance for the Rays since Aug. 25. He recorded a two-out save on Sept. 4 at Toronto.

The Athletics are 12-5 in extra innings.

“It’s fun baseball that we’re playing right now, and every day it’s a different person coming through in clutch situations,” Jackson said.

Numbers

Chapman has 23 doubles and 38 extra-base hits since the All-Star break. ... Oakland C Jonathan Lucroy threw out two runners on stolen base attempts. ... Athletics RF Stephen Piscotty went 0 for 4 to end his 14-game hitting streak.

Trainer’s room

Athletics: RHP Trevor Cahill (upper back) will miss his next scheduled start. “He had a trigger-point injection,” Melvin said. “Hopefully that alleviates it.”

Rays: Duffy (lower back) started after being out of the lineup for three games. “I don’t think the pain is completely out of there but he wants to be in there,” manager Kevin Cash said.