KANSAS CITY, Mo. -- An Ervin Santana throwing error on a possible double play grounder turned out to be a game-changer.
The victory moved the Royals (39-39) to .500, three games behind the American League Central-leading Cleveland Indians.
Eric Hosmer's three-run homer in a five-run fourth inning was the big hit and it came immediately after Santana's errant throw.
"That's what you've got to do against a guy like him," Hosmer said. "Any time a team makes a mistake like that, you've got to capitalize on it.
"That's what we did. If we don't score right there in that inning or only score one, it completely changed the entire ballgame from that point on. Especially when you got two aces on the mound like tonight, that's usually what decides the winner, is the team that capitalizes on mistakes."
Mike Moustakas blasted his team-leading 21st home run in the sixth. Jermaine Dye holds the Royals' record with 22 home runs in 2000 before the All-Star break.
Alex Gordon drove in the final two Kansas City runs with sacrifice flies.
Santana (10-5) allowed seven runs (five earned) and eight hits in 5 1/3 innings.
Santana's errant throw on a potential double-play grounder paved the way for the five-run fourth inning.
Jorge Bonifacio led off the inning with a single to right field, the first Kansas City hit. Lorenzo Cain hit a comebacker, but Santana tossed the ball past second baseman Brian Dozier and into center field.
Santana was visibly upset with his error and Hosmer hit his next pitch for an opposite-field, three-run homer just inside the left-field foul pole. There was a crew chief challenge to make sure it was fair, but after a one-minute and 51-second delay the call on the field was upheld.
The Royals tacked on two runs before the inning ended with Alcides Escobar and Whit Merrifield singling in the other runs.
"If you ask my opinion, I think the game turned on one play, and that was the comebacker," Twins manager Paul Molitor said. "You have a chance to get a couple outs and nobody on base and it turned into a big rally because we didn't execute.
"It's one of those throws you make from the side of the mound and your feet land maybe a little differently than on flat ground and it seemed like the ball took off on him. He was good early, couldn't stop the bleeding there. They put up a big number and we generated almost nothing off of their guy."
The Twins scored first in the third inning.
The Twins threatened in the fifth after Byron Buxton walked and Dozier singled. Vargas retired Mauer on a fly ball to center and Sano on a comebacker to end the inning.
NOTES: LHP Danny Duffy (strained right oblique) threw 66 pitches in 4 2/3 innings in a minor league rehab start Thursday with Triple-A Omaha at Colorado Springs. He allowed one run and four hits. ... The Royals recalled LHP Eric Skoglund from Triple-A Omaha and optioned RHP Jake Junis to the Storm Chasers. ... The Twins will bring up RHP Felix Jorge as the 26th man and start him in the second game of a doubleheader Saturday. Jorge went 8-1 with a 3.26 ERA with Double-A Chattanooga. RHP Jose Berrios will start the first game. ... Twins DH Eduardo Escobar batted cleanup for the first time. ... RHP Luke Farrell, the son of Red Sox manager John Farrell, will make his big league debut and start the Saturday opener for Kansas City. RHP Jason Hammel will start the nightcap. ... LHP Travis Wood could be the Royals' starter Sunday if they do not have to use him Saturday.