MINNEAPOLIS — The pitch was a curveball, and Lorenzo Cain started his swing, his hips rotating and his legs clenching and hands moving forward.

There were two outs in the seventh inning on Sunday at Target Field, and Twins reliever Alan Busenitz had just spun a 1-2 curveball that dived toward the dirt. One more strike would thwart a potential rally. But Cain held up in time, checking his swing as his momentum pulled his body downward. Or did he?

Home-plate umpire Marty Foster and first-base ump Mike Muchlinski ruled that Cain did not swing. Minnesota manager Paul Molitor vehemently disagreed, earning an ejection. The argument was at the heart of the Royals' 5-4 victory over the Twins at Target Field.

Moments after being granted a stay from Muchlinski, Cain saw a 97 mph fastball out over the plate and roped a go-ahead, two-run triple off the wall in right-center field. The missile ricocheted away from Twins center fielder Byron Buxton, allowing Alcides Escobar to score from second and Whit Merrifield to sprint home from first.

Cain, meanwhile, hauled around the bases and tore through a stop sign at third base, digging for an inside-the-the-park homer. The relay throw was on time and Cain was out at the plate. The moment was still pivotal.

He atoned for a costly error in the sixth inning, when his misplay on a line drive by the Twins' Joe Mauer opened the door for two unearned runs against Royals starter Ian Kennedy. The Royals secured a series victory in Minnesota, rebounding from a humiliating 17-0 loss on Saturday night and remaining 3 { games behind the Twins in the race for the second American League wild card.

Cain finished 3 for 4 with two RBIs. He was also a presence on defense, contributing two terrific plays in center field. He started a double play in the fourth by tracking down a ball in the left-center gap, and he helped strand two base runners during a nervous eighth with a running catch in deep center field.

In his first start of September, Kennedy surrendered four runs (two earned) in 5 2/3 innings, moving forward after a brutal August.

Brandon Maurer earned his first save as a Royal, stranding a runner at second in the ninth after a rare error by Alex Gordon.

The Royals took a 3-2 lead in the sixth inning when Melky Cabrera whacked a two-run homer, his 17th of the year, to right field against Twins starter Ervin Santana.

Kansas City will open a three-game series against the Detroit Tigers on Monday afternoon.