MINNEAPOLIS — Royals starting pitcher Brad Keller tossed a gem. He walked a tightrope at times, but executed the must-have pitches against a dangerous lineup, perhaps the most dangerous in the majors.

Unfortunately for the Royals, relief pitcher Jake Diekman simply couldn't navigate that high-wire act the same way. With a runner on and two outs in the eighth inning on Friday night, Diekman gave up a two-run home run to Twins catcher Mitch Garver that decided a pitchers' duel between America League Central Division foes.

Garver's home run dealt the Royals a 2-0 loss in the opening game of a three-game series in front of an announced sellout crowd of 38,898 at Target Field, where it was Prince Night at the ballpark as the Twins recognized the star recording artist and Minnesota native (who died in 2016).

"It was like 6 inches up," Diekman said of the pitch to Garver. "If it was down on the corner, it would've been way better, but it was up. It was middle up."

The game simultaneously served as the kickoff of a weekend of celebrating former Twins catcher, Minnesota native and former AL MVP Joe Mauer. Mauer took part in a pregame ceremony on the field on Friday, and he'll also be part of pregame festivities on Saturday when the Twins will retire his jersey.

The night also featured the first career ejection for Royals outfielder Jorge Soler, who entered the night ranked sixth in the American League in home runs (17).

Twins starting pitcher Kyle Gibson (7-3) pitched eight scoreless innings and struck out six. He held the Royals to two hits and didn't walk a batter.

Whit Merrifield and Billy Hamilton had the Royals only hits.

Keller pitched seven innings, and he held the Twins, the major league leaders in home runs, to three measly singles. Keller walked three and struck out five when he wasn't getting Twins hitters to repeatedly pound his sinking fastball into the dirt.

"He was fantastic tonight," Royals manager Ned Yost said of Keller. "Got (Jonathan) Schoop twice on big double plays. They were big in that part of the game. He got through the seventh inning with 97 pitches after having two pretty high-leverage innings."

Keller has now pitched seven or more innings and allowed three runs or less in each of his past three starts.

After giving up a single to the first batter he faced, Keller retired nine in a row before he issued a one-out walk to Jorge Polanco in the fourth inning.

In the bottom of the fourth, Soler made an early exit after arguing balls and strikes with home-plate umpire Hunter Wendelstedt in the middle of an at-bat.

The back-and-forth between Soler and Wendelstedt continued as Soler stepped away from the plate between pitches, but Soler got ejected when he stepped toward Wendelstedt and barked back.

"For some reason he's real sensitive," Yost said of Wendelstedt. "He thought he was being showed up. Of course, the pitch was 6 inches down. Soler told him it was down, and he said, 'Well, it's only the first pitch.'"

The Twins looked like they might break through with some help from the Royals defense in the fifth inning. An error by third baseman Cheslor Cuthbert and an infield single put back-to-back runners on without the ball having gotten out of the infield.

However, Keller got an inning-ending ground ball from Schoop to third base for an around-the-horn double play.

The sixth inning for Keller started with him hitting Byron Buxton on the hand. Keller then walked Max Kepler on five pitches. Again, Keller wiggled out of the jam. This time, Keller struck out Polanco, the league's leading hitter entering the day, and got a pair of fly balls to end the threat.

"We knew they would be super aggressive," Keller said of Polanco. "It was huge for him to swing through that. And we got two pop-ups after that."

Keller pulled another harrowing Houdini act in the seventh after a one-out walk to Miguel Sano and a single by Ehire Adrianza. With Royals reliever Brad Boxberger warming up in the bullpen, Keller induced a ground ball to third that led to another inning-ending around-the-horn double play.

"One run could be the deciding factor in that game," Keller said. "You just try to go out there and match whatever he does. If he puts up a zero, we gotta put up a zero. Defense played great behind me. It was definitely a fun game. Unfortunately, we were on the wrong end of it."

In the eighth, Diekman sandwiched a pair of fly outs around a walk before facing Garver in the pivotal at-bat of the game.