MINNEAPOLIS -- Mike Moustakas homered for the first time since mid-August, Brandon Moss also went deep and Kansas City held off Minnesota 7-6 on Friday night.
Melky Cabrera tied a season-high with four hits for the Royals, who won for just the second time in eight games.
Jorge Polanco homered for Minnesota, which lost for the first time in five games.
Kelvin Herrera allowed a two-run single to Joe Mauer in the ninth, but Scott Alexander struck out Eddie Rosario with the bases loaded for his second save in four tries.
The Twins remain one game behind New York -- which lost 4-1 to Boston -- for the top AL wild card spot. Minnesota entered the night leading Los Angeles, which played at Texas, by 1 1/2 games for the second spot. Kansas City is now 3 1/2 games behind.
Royals' starter Jason Hammel (7-10) allowed Polanco's two-run home run in the first and a run in the third, before retiring 12 straight. He allowed four earned runs on seven hits in 6 1-3 innings.
Moustakas hit a three-run, line-drive homer to right for a 5-2 lead in the third. It was his 36th of the year and first in 13 games since Aug. 15. He tied Steve Balboni for the most by a Kansas City player in a season. Moustakas is one of four players trailing New York's Aaron Judge by one for the AL lead.
Making his fourth start of the season, Minnesota's Dillon Gee (1-2) allowed five earned runs in 2 2-3 innings.
Moss hit a two-run home run of Tyler Duffey in the sixth to make it 7-3.
CLOSING A CAREER
Former closer Joe Nathan signed a one-day contract with Minnesota Friday to retire as a Twin.
Nathan, 42, saved 260 games for the Twins during seven seasons -- including a career-high 47 in 2009. He also pitched for the Giants, Rangers, Tigers and Cubs during a 16-year career. The six-time all-star, drafted by San Francisco as a shortstop, ranks eighth on the all-time saves list with 377.
"(This was) a ride that I could not have imagined I could have gone down," he said during an emotional new conference.
Royals: LHP Brian Flynn (left groin strain) was transferred to the 60-day disabled list . . . RHP Trevor Cahill (right shoulder impingement syndrome) was reinstated from the 10-day disabled list.
Twins: CF Byron Buxton, who missed Thursday's game with a bone contusion on his left hand, pinch ran in the ninth. . LHP Hector Santiago was moved to the 60-day disabled list. Out since July 3 with an upper back strain, he is scheduled to make his second rehab start Sunday at Triple-A Rochester.
Minnesota's Kyle Gibson (8-10, 5.59) is scheduled to face Kansas City's Onelki Garcia (0-0, 7.94) Saturday in game two of the weekend series.