Twins manager Paul Molitor couldn't have wanted a hotter hitter at the plate.

Eddie Rosario, with nine home runs over his previous 25 games, batted with two outs and the bases loaded in the ninth inning Friday, facing Royals reliever Scott Alexander.

Alexander entered one batter earlier, when closer Kelvin Herrera left because of lower forearm tightness. An in-form Rosario vs. a rookie? Molitor will take that matchup, even if Alexander is a lefthander.

Then the attack-minded Rosario took the first pitch for a strike.

"A little untypical of Rosie," Molitor said. "He didn't swing at the first pitch, and then he had to battle."

Rosario fouled off the next pitch and fell into an 0-2 hole before striking out two pitches later as an intense comeback fell short in a 7-6 loss to the Royals that ended the Twins' winning streak at four games.

Down 7-4 in the ninth, and with Herrera in the game, Max Kepler reached base when Whit Merrifield misplayed his grounder for an error. Herrera got the next two outs, but Zack Granite worked a walk, and Brian Dozier was hit by a pitch to load the bases.

With fans on their feet, Joe Mauer hit a two-run single to make it 7-6. Herrera fell behind 3-0 to Jorge Polanco, then stepped off the mound, and a trainer went to check on him. Herrera was removed, the second time in two weeks it has happened, and Alexander entered.

The Twins, however, could not duplicate Thursday's walk-off victory. Alexander picked up his second save.

"It was a good fight," said Molitor, whose team stayed one game behind the Yankees for the first AL wild card and is 1½ games ahead of the Angels and Orioles for the second. "We hung around until the last round and made it interesting."

The Twins nearly came back from a deficit created by Dillon Gee (1-2), who failed to get out of the third inning. The Twins gave him a 2-0 lead in the first on Polanco's two-run homer, but Gee gave up five runs in the third, including a three-run homer to Mike Moustakas. It was Moustakas' 36th home run of the season, tying him with Steve Balboni for the Royals' single-season record.

Molitor thought that Gee had trouble with the curveball on Friday. That wasn't all.

"I didn't have a feel for much," said Gee, who gave up five runs over 2⅔ innings on six hits and three walks. "Fastball command was bad too. A lot of balls leaking over the middle of the plate."

He was relieved by Tyler Duffey, who gave up a two-run home run to Brandon Moss in the sixth.

The Twins are faced with a decision on Gee. His outing was the shortest by a Twins starter since Dietrich Enns went 2⅓ innings on Aug. 16 at Milwaukee. Gee also lasted only four innings Saturday at Toronto.

Strong consideration was given to calling up Aaron Slegers on Friday, but the staff went with Gee. Slegers instead started for Class AAA Rochester, giving up three runs over 6⅔ innings but striking out 10 while improving to 15-4 for the Red Wings. Slegers started for the Twins on Aug. 17, holding Cleveland to two runs over 6⅓ innings.

It wouldn't be difficult to slide Slegers in on Wednesday against the Rays.

"We're kind of planning through the next seven to 10 days on how we are going to put together the rotation," Molitor said. "We're probably going to sleep on that a little bit. [Gee] has been start-to-start, as it is."