ST. PETERSBURG, Fla. (AP) -- Masahiro Tanaka had another poor outing in his final start before the playoffs.
Tanaka gave up four runs and six hits over four-plus innings in in the New York Yankees' 8-7 loss to the Tampa Bay Rays on Wednesday night.
"It just comes down to the mechanics," Tanaka said through a translator. "I wasn't able to locate my pitches the way I wanted to."
New York's lead over Oakland for home-field advantage in the AL wild-card game on Oct. 3 was cut to 1 1/2 games, with the Yankees holding the tiebreaker.
Yankees manager Aaron Boone hasn't decided whether Tanaka, J.A. Happ or Luis Severino will start against the A's.
"A lot of people ask me that, friends, family, all that, and honestly I have no idea," Boone said before the game.
New York rallied for four runs in the ninth against Sergio Romo, who struggled to get four outs for his 24th save.
"They're tough. They're talented," Rays manager Kevin Cash said.
Aaron Judge hit a bases-loaded RBI single before Luke Voit hit a two-run off the center-field wall that Mallex Smith nearly caught. Judge held up, forcing Voit to only reach first. After Giancarlo Stanton had a run-scoring infield single, Romo retired Tyler Wade on a flyout and Miguel Andujar on a popout.
"I'm proud of the way the guys were fighting," Judge said. "Games like that will help us down the stretch and the postseason."
Tanaka (12-6) was coming off a four-inning start last Thursday in which he allowed five runs and eight hits during an 11-6 loss to Boston.
"Regardless of how I pitched the last two games, it's something that's out of my control, so I guess I don't really have an opinion on that," Tanaka said of the wild-card game.
Tampa Bay's Kevin Kiermaier was hit by Tanaka's pitch in the first and left two innings later with what X-rays determined was a hairline fracture of the right foot. The center fielder made a running catch on Brett Gardner's drive during the second.
Kiermaier missed 57 games this season with a torn right thumb ligament.
"What a way for my year to end," Kiermaier said. "That's my 2018 in a nutshell."
After falling behind by three, the Rays went up 4-3 on Tommy Pham's third-inning solo homer off Tanaka. Pham extended his career-best, on-base streak to 28 games, the longest active run in the AL. He has a hit in 27 of them.
Reliever Yonny Chirinos (5-5) went four scoreless innings and worked out of a bases-loaded, one-out jam in the fifth when Stanton grounded into a double play.
Both teams scored three times in a first inning that lasted 40 minutes and saw Tampa Bay's Ryne Stanek (30) and Tanaka (36) combine for 66 pitches.
Neil Walker hit a three-run homer , while Tanaka walked one, hit a batter, allowed three hits and was charged with an error on an errant throw to second base after fielding C.J. Cron's grounder between the mound and the first-base line.
Walker was hit on the shin by pitched ball in the eighth and was replaced by Wade. X-rays were negative.
Matt Duffy, who scored on Tanaka's error, left after the inning with right quadriceps tightness.
Cron had an RBI double in a four-run eighth off David Robertson. The inning included Gary Sanchez's major league-leading 18th passed ball, which raised his two-year total to 34.
Robertson joined Mariano Rivera (1,115) and Dave Righetti (522) as the only pitchers to make 500 appearances with the Yankees.
It was the eighth time the Yankees have lost when scoring seven or more runs.
Yankees: SS Didi Gregorius (right wrist) resumed baseball activities and might return this weekend. ... CF Aaron Hicks (left hamstring) will likely start Friday. ... INF Gleyber Torres (hip/groin) struck out as a pinch-hitter in the sixth.
Rays: 1B/DH Ji-Man Choi sat out after experiencing concussion-like symptoms and cutting his left ear during a play at the plate Tuesday. "Nothing more than stitches in his ear," Cash said.
LHP CC Sabathia (8-7) could be making his final regular-season start for the Yankees on Thursday. He needs seven innings to reach 155 and earn a $500,000 bonus. The Rays will use relievers.