NEW YORK — Samuel Deduno pitched seven impressive innings and the slumping Minnesota Twins finally figured out a way to beat the New York Yankees, hitting three home runs off Phil Hughes in a 4-1 win Saturday.

Trevor Plouffe, Ryan Doumit and Pedro Florimon connected against Hughes — all on 2-2 pitches. Minnesota snapped a six-game losing streak with its second victory in 14 games, winning for the first time in six meetings with the Yankees this year.

New York won 32 of the previous 39 matchups, including a pair of playoff sweeps.

Beaten by Hughes earlier this month, Deduno (5-4) scattered six hits in his first start at Yankee Stadium. He struck out three, walked three and matched the longest outing of his career.

Casey Fien pitched a scoreless eighth and All-Star closer Glen Perkins, making his first appearance in a week, got three outs for his 21st save in 23 chances.

Hughes (4-9) tied a career high with 10 strikeouts in 7 1-3 innings but gave up three homers in a game for the second time this season. He has allowed 18 long balls in as many starts.

The Yankees, who swept four games in Minnesota from July 1-4, had won three straight and nine of 12.

Twins manager Ron Gardenhire missed the finish after he was ejected in the eighth for arguing a call at first base.

About 13 hours after the Yankees finished a rain-delayed shutout Friday night, the teams were back on the field.

New York jumped on top in the first inning when Ichiro Suzuki doubled and scored on Robinson Cano’s single, but Deduno got Vernon Wells to ground into an inning-ending double play and settled in from there.

The right-hander, who pitched the Dominican Republic to the World Baseball Classic championship in March, got some help when Zoilo Almonte was caught stealing second with a runner on third to end the fourth. Deduno struck out Suzuki with two on to finish the fifth and worked around a one-out double in the seventh.

Plouffe tied it in the second, and Doumit put the Twins ahead in the seventh.

Gardenhire was ejected by plate umpire Vic Carapazza in the eighth after Clete Thomas was called out for interference while running to first on a slow roller that was picked up by Hughes. His throw to first got away from Lyle Overbay as the runner arrived almost simultaneously, but Thomas was called out by Carapazza and Aaron Hicks was sent back to first base.

Florimon followed with his fifth home run, a high fly that cleared the short porch in right to make it 4-1. Hicks opened the inning with a bunt single.

It was Gardenhire’s 65th career ejection as a manager and third this season.

NOTES: Rookie OF Oswaldo Arcia, who has struck out in 11 of his last 13 at-bats, was rested by the Twins. Arcia whiffed all four times up Friday night and is hitless in his last 20 at-bats. “He’s swinging at some cartoon breaking balls. He’s swinging three times at one pitch and he’s not hitting any of them,” said Gardenhire, who deemed it best to give Arcia a breather. “He’s got the starry eyes right now. He’s overwhelmed right now.” ... Joe Mauer was the DH and Doumit started behind the plate. ... LHP CC Sabathia (9-7, 3.99 ERA) pitches New York’s final game before the All-Star break Sunday against Twins RHP Kyle Gibson (1-2, 7.27), who will make his fourth big league start. Sabathia is 11-0 with a 2.01 ERA in his last 12 starts against Minnesota, including the postseason, since Aug. 3, 2007. ... Alex Rodriguez (hip surgery) was scheduled to play one game in a doubleheader for Class-A Tampa. ... The Yankees wore camouflage caps, with a camouflage pattern inside the numbers and logos on their uniforms, on Military Appreciation Day. ... There was a moment of silence before the game on the third anniversary of former owner George Steinbrenner’s death.