MINNEAPOLIS -- For the first time in his career, Masahiro Tanaka didn't provide a quality start. But thanks to ex-Yankee Phil Hughes, he didn't need to.
New York used two big innings, including homers by Carlos Beltran and Zelous Wheeler in the fifth, to snap a season-high five-game losing skid with a 7-4 victory over the Twins on Thursday night at Target Field.
"The number one thing is for the team to win, and I think the offense came through and got me a lot of run support tonight," Tanaka said through his translator.
After collecting just one hit through the first four frames against Hughes, who had beaten the Yanks earlier this season, the New York bats came alive in the fifth. Mark Teixeira and Brian McCann led off with singles, and then Beltran smacked a three-run homer -- a 401-foot shot to right-center.
"The one big mistake of the game was the pitch to Beltran," Hughes said. "The other at-bats, I went hard-in, but I thought I'd try to get a ground-ball double play and threw a two-seamer away, but it caught too much of the plate."
The blast gave New York a 3-2 lead, and moved Beltran to fourth all-time among switch-hitters with 367 home runs.
Two batters later, Wheeler, who was called up from Triple-A on Thursday and made his Major League debut, belted a solo shot for his first career hit. The rookie crushed a 3-1 Hughes fastball into the Yankees' bullpen in left-center to extend the lead to two runs.
"I got a pitch over [the plate], elevated up and put good wood on it," Wheeler said. "I was like, 'Wow, I really hit a home run!'"
Yankees manager Joe Girardi beamed about his newest player.
"It's great to see," he said. "Talk about a kid who's persevered for a long time, and to get his opportunity -- and his first hit to be a homer and in our bullpen so we get the ball -- is kind of special."
The insurance homer was important, because Tanaka was not his usual dominant self. He gave up an RBI double to Chris Parmelee in the first inning, and then allowed two straight hits in the third to set up another run.
After the Yankees' offense gave him a lead, Tanaka nearly squandered it in the sixth. Twins catcher Kurt Suzuki smacked a double and scored on a groundout by Kendrys Morales to make it 4-3.
"I felt tonight, this outing was one of my worst ones this season as far as hitting the spots and making pitches," Tanaka said.
But Tanaka did enough damage control to pick up his Major League-leading 12th win. The right-hander went seven innings and gave up a career-high four runs on nine hits and zero walks to go with three strikeouts.
"He probably wasn't quite as sharp as he's been, but you're gonna have starts like that," Girardi said. "And he did a good job of minimizing damage and giving us a chance to win."
The Yanks made sure Hughes stayed in a tailspin. The righty exited the game in the seventh inning, with Wheeler on third base and Brendan Ryan at second with one out. Reliever Brian Duensing immediately gave up an RBI single to Brett Gardner and an RBI groundout to Derek Jeter to make it 7-3.
Eduardo Escobar singled in the Twins' half of the seventh to cap the scoring.
Hughes gave up seven runs in 6 1/3 innings, the third straight game he's given up at least five earned runs. The two homers off Hughes were also the first he'd given up in five starts.
"He's a guy that likes to throw a lot of fastballs, and he's gonna pound the strike zone," Beltran said. "We were able to take advantage of the mistakes he made."
Hughes' previous start against his former team went much more smoothly, as he gave up two runs in eight innings in the Twins' 7-2 win at New York on June 1.
Tanaka could not manage a quality start for the first time in his career. He gave up four earned runs for the first time in 17 Major League outings and surrendered nine hits, also a career high.
Dellin Betances fired a scoreless eighth and David Robertson worked around a two-out walk in the ninth inning for his 19th save.
Alex M. Smith is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.