ST. PETERSBURG, Fla. — Rookie Gary Sanchez keeps putting up numbers at an astounding rate — and putting the New York Yankees in position to make a run at a playoff spot.

Sanchez hit two more homers and drove in five runs, Masahiro Tanaka won despite allowing four home runs in the same inning and the Yankees beat Tampa Bay 11-5 on Wednesday night.

"It's hard to believe," New York manager Joe Girardi said of Sanchez. "I haven't seen anything like it."

The Yankees moved within 2 1/2 games of Baltimore for the second AL wild-card spot. New York also would have to jump over Seattle, Houston and Detroit to earn a post-season berth.

Sanchez homered in his fourth straight game. The catcher hit a three-run shot in a four-run second off Alex Cobb (1-1) and added his 19th homer in 43 games this season on a solo drive in the sixth against Justin Marks.

"What he's doing is so impressive," said teammate Brian McCann, who had four hits in his 1,500th major league game.

Including two games last season, Sanchez became the first player in major league history to hit 19 homers in his first 45 games. Wally Berger, with the Boston Braves in 1930, went deep 19 times in his first 51 games.

"It's great when you achieve something like that, but what makes it better is that you're helping the team win," Sanchez said through a translator.

Sanchez was hit on the left arm by a back swing in the ninth but stayed in the game and later said he was fine.

Sanchez has eight shots in his last 12 games after a 10-game home-run drought.

Tanaka (14-4) won his seventh straight decision. He was staked to a 7-0 lead entering the bottom of the third before Tampa Bay teed off.

Bobby Wilson led off with a home run. After Tanaka got two consecutive outs, Evan Longoria, Brad Miller and Corey Dickerson hit three consecutive shots. The four home runs in an inning set a Rays record.

"Strange," Girardi said.

"Probably it's a first," Tanaka added through a translator. "The sharpness of the ball wasn't there tonight. So, it was a grind."

Tanaka joined Zack Greinke, Collin McHugh and Justin Verlander as the only pitchers to give up four homers in an inning this season. He became the first Yankees pitcher to do it since Chase Wright on April 22, 2007, at Boston.

Miller hit another solo shot in the eighth to give him 30 homers this season.

Cobb, making his fourth start since returning from Tommy John surgery, allowed seven runs and nine hits in 1 1/3 innings.

"No concerns with the elbow," Cobb said. "I'm very thankful that I'm healthy. There's no physical questions."

TRAINER'S ROOM

Yankees: 3B Chase Headley was out of the lineup for the third straight game but hopes to play Thursday.

Rays: OF Steven Souza Jr. had left hip surgery and is expected to be ready for spring training.

TANAKA TIME

Tanaka had not given a homer in 17 of his previous 30 starts this season. ... Tanaka threw two wild pitches with Jaff Decker batting in the second, including one that became lodged under the pad on the wall behind the plate. ... Tanaka is 6-0 against Tampa Bay, including four wins this season.

UP NEXT

Yankees RHP Luis Cessa (4-2) and Rays LHP Blake Snell (5-8) are Thursday night's starters in a matchup of rookies.