MINNEAPOLIS - The Phil Hughes seen for much of 2013 in the Bronx showed up Thursday night. The timing could not have been better for his former team.

An offensively challenged Yankees lineup hit two crucial homers off Hughes in a 7-4 victory over the Twins at Target Field, snapping a five-game losing streak.

Carlos Beltran, who had mostly struggled at the plate since coming off the disabled list June 20, hit a three-run homer in the fifth inning to give Masahiro Tanaka a 3-2 lead. Two batters later, third baseman Zelous Wheeler, called up from the minors earlier in the day and making his major-league debut, homered into the Yankees' bullpen in left-center.

"Tanaka's one of the best guys we have in the rotation and it was great to get him that lead,'' Beltran said. "After that, we were able to put good at-bats together. It always feels good when the whole team contributes to help a starter win a ballgame.''

Tanaka (12-3, 2.27 ERA), who lost his previous two starts, was not especially sharp, allowing a season-high four earned runs. He had begun his MLB career with 16 straight quality starts, but that came to an end -- and 17 had never been done since earned runs became a stat in 1912, according to Elias. But he was good enough in his seven innings, allowing nine hits and no walks and striking out three.

He was backed by an offense that did something it hadn't done in some time: tacked on runs.

advertisement | advertise on newsday

"This outing was one of my worst ones this season as far as hitting the spots and making pitches,'' said Tanaka, who nonetheless leads the majors with 12 victories and, according to Elias, is the first Yankees rookie to win that many before the All-Star break. "The offense came through for us tonight, got me a lot of run support.''

Hughes (8-5, 3.95) won June 1 at the Stadium, allowing two runs and three hits in eight innings. This time he gave up a season-worst seven runs in 61/3.

After taking a 4-3 lead into the seventh, the Yankees chased Hughes. Brendan Ryan had a run-scoring double, Brett Gardner added an RBI single and Derek Jeter drove in Ryan with a forceout, making it 7-3. "When you continue to add to the lead, it feels good for the pitcher, less pressure,'' Beltran said. "Our offense, at some point, we have to find a way to score more runs, there's no doubt about that.''

Dellin Betances pitched a scoreless eighth, striking out two. David Robertson added three strikeouts in a scoreless ninth to record his 19th save and give the Yankees (42-42) an important win to start this 11-game trip leading to the All-Star break.

The Twins (38-46) brought a 2-0 lead into the fifth, but Mark Teixeira -- back in the lineup after having his right knee drained Tuesday night -- and Brian McCann singled on consecutive pitches to begin the inning. McCann aggravated his sore left foot while leaving the batter's box and will sit Friday, Joe Girardi said, although McCann said, "It'll be fine.''

Beltran then hammered a fastball for his ninth homer and a 3-2 lead. An out later, Wheeler, 27, sent Hughes' 3-and-1 fastball over the wall in left-center. "A special night for him,'' Girardi said. "It's great to see. Talk about a kid who's persevered for a long time.''

Before the game, Wheeler said he was a "little nervous,'' which didn't show during his two-hit night. "It felt great,'' he said. "I've been waiting for this moment for a long time.''