Jorge Polanco missed a home run by about an inch Saturday, and Byron Buxton hit one by about the same length. Yet for all the focus on those so-close calls, wild pitches were the more effective offensive strategy.

Jhoan Duran's misfire in the ninth inning scored Edward Olivares from third base, and the Royals rode that small advantage to a 3-2 victory at Target Field, the Twins' first loss to Kansas City in six meetings this season.

The Twins, too, scored a run on a wild pitch, the only time one of their 15 non-homer baserunners reached home plate. The Twins, who had won 10 in a row at home against Kansas City, went 0-for-11 with runners in scoring position and stranded a dozen.

"Yeah, that's kind of a little bit messed up," manager Rocco Baldelli said. "We were on base the whole game. We couldn't really come up with a big punch."

That goes for the home runs, too. The Twins extended their streak to 12 consecutive games with a home run, their longest in two years, but only by the smallest margin possible. Buxton's seventh-inning line drive bounced off the top of the padding in left field and glanced off the wall behind it, giving the Twins, once umpires conferred over the call, a brief lead.

Standing on second base, Buxton was having his own discussion about the play while umpires deliberated, with Royals shortstop Bobby Witt Jr.

"He was like, 'I think that hit the brick. … It came off pretty hot,' " Buxton said. "I was like, 'Well, hopefully they change it.' And five seconds later, it was a homer."

Polanco didn't have the same luck. In fact, his home-run-that-wasn't became an inning-ending out.

Polanco, who homered Friday, hit a first-inning fly ball that hit the top of the wall in right field and ricocheted back onto the field. Believing it had cleared the wall, Polanco went into a home run trot around first base, but Royals right fielder Nick Pratto quickly retrieved the ball and threw it to Witt, who tagged Polanco out as he jogged past.

The odd play set the tone for a frustrating day by the Twins against Kansas City starter Brad Keller. In each of the next five innings, they collected at least one hit — but left runners in scoring position, seven in all, for the lack of a timely hit.

Their lone run before Buxton's homer came when Keller walked Buxton in the fourth inning, gave up an infield hit to Jose Miranda, then threw two wild pitches, the latter allowing the designated hitter to jog home with the game's first run.

Bailey Ober, returning to the rotation in place of Kenta Maeda, gave the Royals far fewer scoring opportunities — but they cashed in just as many as the Twins did against Keller. A leadoff double by Edward Olivares in the fifth inning turned into a run when Nicky Lopez singled to center, Olivares sliding home ahead of Michael A. Taylor's throw.

After Buxton's home run, the Royals quickly tied the score against the Twins bullpen in the eighth inning. Witt drew a leadoff walk from Griffin Jax and stole second, one of the Royals' four successful steals on the day. He moved to third base on a ground out, then stopped halfway and went back to third on MJ Melendez's shallow fly ball to center.

With Salvador Perez due up, Baldelli called upon Jorge López to finish the inning, a surprising choice given Perez's five hits in seven previous at-bats against the righthander.

"We wanted to get Jorge in that situation, and it didn't work out that time," Baldelli said. He didn't want to intentionally walk Perez, which would have put the go-ahead run on base, and he didn't want to call upon Duran in the eighth inning. He was aware of Perez's history against López, the manager said, "but it's not going to be a deciding factor in any of the decisions we make."

As if on cue, however, Perez grounded a single up the middle to score Witt. It was Perez's 60th career RBI at Target Field, one behind Miguel Cabrera for the all-time lead by an opponent, and set up the game-winning sequence, and wild pitch, an inning later.

"I'm feeling good, you know? That happens sometimes. You don't always throw good," said Duran, who didn't give up a hit but walked three hitters for the first time in his career. "That's baseball."