NEW YORK (AP) -- J.D. Martinez wanted that fourth home run. He had never even hit two in a major league game before, so might as well tie the record the first time he got a chance.

New York Yankees Stephen Drew hits a ninth-inning solo home run off Detroit Tigers relief pitcher Joakim Soria. (AP Photo/Kathy Willens)
New York Yankees Stephen Drew hits a ninth-inning solo home run off Detroit Tigers relief pitcher Joakim Soria. (AP Photo/Kathy Willens)
loading...

In his final at-bat, Martinez swung at a pitch out of the strike zone and popped up to right field. It was just about the only time he missed Sunday, when he hit three homers and drove in six runs to lead the Detroit Tigers over the New York Yankees 12-4 to snap a four-game skid.

"I definitely got anxious. I just knew that I was feeling good," Martinez said. "I don't think he threw me one strike."

Victor Martinez homered and drove in four two-out runs off Masahiro Tanaka for Detroit, outscored 21-5 in the first two games of the series.

Andrew Romine hit Jose De Paula's first major league pitch for a solo shot in the sixth.

"To be able to come back after an embarrassing night ... is big for us," Romine said of Detroit's effort only hours after losing 14-3 on Saturday.

Anibal Sanchez (6-7) lost his scoreless streak at 21 2-3 innings when Brian McCann homered with one out in the second. But the Tigers' right-hander was steady for seven innings to earn his third straight win. He yielded seven hits and three runs in handing the Yankees only their second loss in 13 home games.

J.D. Martinez connected off Tanaka (4-3) with two outs in the first. He struck out looking in the third and led off the fifth with another homer against the Japanese right-hander, who allowed three long balls for the first time in his big league career.

J.D. Martinez then went deep off Danny Burawa with two on in the sixth to give the Tigers an 11-2 lead. Burawa was making his major league debut.

"It was just one of those days where you take swings and you're actually hitting the ball how you want to hit it," J.D. Martinez said. "There's not too many of those days, so you've just got to take advantage of them."

With a chance to tie the major league record for homers in a game, he flied out to right in the eighth.

It was the first three-homer game for Detroit since Miguel Cabrera did it at Texas on May 19, 2013.

J.D. Martinez became the first Tigers player to connect three times against the Yankees since Charlie Maxwell in 1959.

"It's pretty cool just to say the first time you did it was here," J.D. Martinez said. "This is the pinnacle of baseball."

Stephen Drew had his third multihomer game this year for the Yankees, connecting in the seventh off Sanchez and ninth against Joakim Soria.

Tanaka gave up a career high-tying 10 hits and seven runs in five innings. He fell to 2-2 since his return from the disabled list on June 3.

"I was missing spots and I was missing them by a far margin so I wasn't really sharp today," Tanaka said through a translator.

After Tanaka got two quick outs to open the game, Cabrera singled and Victor Martinez sent a drive into the second deck in right field. Yoenis Cespedes reached on shortstop Didi Gregorius' ninth error of the season before J.D. Martinez went deep.

Victor Martinez had a two-run single in the second after Cabrera walked with two outs.

"It was nice to see him turn on some balls," Tigers manager Brad Ausmus said of the switch-hitting Victor Martinez, who was batting left-handed.

Burawa and DePaula were optioned back to Triple-A Scranton/Wilkes-Barre after the game.

TRAINER'S ROOM

Tigers: 3B Nick Castellanos was out of the starting lineup for a second straight day. He's batting .143 (9 for 63) over his last 19 games.

Yankees: CF Jacoby Ellsbury (knee) did some straight ahead running on the outfield grass and ran some short routes to make barehanded, over-the-shoulder catches of tossed baseballs.

SANTOS SURGERY

Yankees reliever Sergio Santos is going to have Tommy John surgery after making just two appearances for the team. Santos had 30 saves for the White Sox in 2011 but has been plagued by injuries since then. He was moved to the 60-day DL after the game.

UP NEXT

Tigers: Continue their seven-game road trip in Cleveland. LHP Kyle Ryan (1-1) gave up five hits over 6 1-3 innings in his first start in place of Shane Greene, who was recently demoted. But three of the hits were home runs.

Yankees: RHP Michael Pineda (8-3) took a no-hitter into the seventh inning in his last start. He faces the Phillies, the team that has scored the fewest runs in baseball this season, in the opener of an interleague series in New York.

© 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed. Learn more about our Privacy Policy and Terms of Use.

More From New Jersey 101.5 FM