MINNEAPOLIS — With one powerful swing, Miguel Sano put the Minnesota Twins in front of the Kansas City Royals and out of their frustration.

For once, this floundering team had reason to feel good at the ballpark.

Sano hit the go-ahead two-run home run in the fifth inning, and the Twins staved off another series sweep Wednesday by beating the Royals 7-5.

"It hasn't been what everyone was hoping it would be, just being a guy who could come out and dominate in his second year and all the hype, but you know it's a tough game and he's kind of learned that," Twins manager Paul Molitor said.

The major league leader with 67 strikeouts in 45 games, Sano bailed out Tyler Duffey (2-3) with his drive into the second deck above left field for a 6-5 lead on his eighth home run this season after Joe Mauer started with a single.

Sano, who is batting .221 after a strong debut in 2015, was in a 2-for-24 skid until that. He credited Mauer for some strategical hitting advice.

"I listened to him," Sano said through an interpreter, "and I hit the ball out."

Eduardo Nunez and Brian Dozier each homered, too, the first two batters to face Royals starter Dillon Gee (1-2) and just the fifth pair in Twins history to go deep in their first two plate appearances of the game.

Duffey gave away a 3-0 lead during a five-run fourth by the Royals, but the right-hander hung around long enough to become the first Twins starter this season to record his second victory. The rotation has totalled six wins. There were 11 pitchers in the major leagues with seven or more victories when the day began.

"When that kind of inning happens, that's kind of the test," Duffey said. "If you don't go out and get it done after that, you kind of quit on your team and I wasn't going to do that."

Duffey displayed the swagger the Twins had in ample supply Wednesday and have been missing all year. He responded to a brief mound visit from Dozier after Sano had returned him the lead.

"I told him he's got to bear down. The winning run is out there and that's the way you have to act," Dozier said.

The Twins (12-34) have trailed at some point in all but two of their games this year. They were in trouble after Eric Hosmer hit a two-run double to halt a 2-for-22 slide and the sizzling Salvador Perez tied the game with another double. Omar Infante added a two-out RBI triple and trotted home on Duffey's wild pitch.

Duffey pitched into the seventh, and Trevor May struck out Lorenzo Cain with two runners on to end a threat. May gave up 10 runs, including four homers, over 3 1/3 innings in his previous five appearances. Cain is batting .356 (32 for 90) with 17 RBIs in this month.

Kevin Jepsen pitched a scoreless ninth for his fourth save in seven attempts. Pinch hitter Jarrod Dyson hustled for a one-out double, but Jepsen struck out Whit Merrifield to end it and give the Royals (24-22) just their third loss in their last 10 games.

The Twins have been swept an astounding eight times already, but not this week. After allowing only two extra-base hits to right-handers all season before Wednesday, Gee gave up four of them in this one in four-plus innings. Nunez went 3 for 4 and is 6 for 8 in his career against Gee.

"It just seemed like when I made a mistake today they really did some damage," Gee said.

Still, the Royals won their fourth straight series.

"It was a great road trip," manager Ned Yost said.

TRAINER'S ROOM

Kansas City: Cheslor Cuthbert again played 3B for Mike Moustakas (bruised left knee). Yost said the plan all along was to re-evaluate him Thursday.

Minnesota: To make room for RHP Buddy Boshers on the 40-man roster, LHP Glen Perkins (strained left shoulder) was transferred to the 60-day disabled list. He's now eligible to be activated June 10.

UP NEXT

Kansas City: The Royals return home for a four-game series beginning Thursday against Chicago, with LHP Danny Duffy (0-0, 2.13 ERA) on schedule to start for the third time. RHP Miguel Gonzalez (0-1, 4.57 ERA) will take the mound for the White Sox.

Minnesota: After a day off for travel, the Twins begin a three-game series Friday in Seattle. LHP Pat Dean (1-0, 3.86 ERA) will make his second major league start. The Mariners will send RHP Felix Hernandez (4-3, 2.21 ERA) to the mound.