KANSAS CITY, Mo. — The bat moved through the zone without connection, and a baseball twirled past Adalberto Mondesi for the third time. As the ball landed in a catcher’s mitt, Mondesi slammed his bat against the dirt, an afternoon of frustration summed in one sequence.

For Mondesi. And for the Royals, too.

The Royals offense wasted opportunities with men on base — and in turn wasted a dazzling start from left-hander Danny Duffy — in a 3-1 loss to the Tampa Bay Rays in front of a “School Day at The K” crowd of 23,343 Thursday at Kauffman Stadium.

The Royals were 0-9 with runners in scoring position, all of those plate appearances coming in the first five innings against Tampa Bay starter Charlie Morton, who lowered his ERA to 2.52.

“Anytime you get an opportunity like that and you don’t capitalize on it, it’s always gonna feel like a wasted opportunity because it is a wasted opportunity. It’s plain and simple,” Royals manager Ned Yost said. “When you break it down, Charlie Morton is a really, really good pitcher. He’s extremely tough in those situations.”

Tampa Bay second baseman Brandon Lowe tagged Wily Peralta for a two-out, two-run home run in the ninth inning, the deciding blow after the two pitching staffs dominated the initial eight innings. Peralta left a changeup up in the zone and over the plate.

Morton and Duffy handed their duel to the bullpens. Jake Diekman and Scott Barlow were unscathed before Peralta allowed the 376-foot looping blast from Lowe into the right-field stands.

It spoiled the positive outcome of the afternoon: Duffy. A battle with location kept Duffy from terming his 2019 debut a success last week. His stuff was there. His velocity was good enough. The final piece to consistently getting outs would be fine-tuning the location.

That came in the encore. Duffy threw 100 pitches over six innings, 73 of them for strikes. He walked just one on a full-count pitch a couple of inches south of the strike zone.

“I feel like I was attacking the zone a little more with my fastball,” Duffy said. “I still feel like I have a good fastball. Not as good as it once was, (but) we were able to utilize it when we had to. But my cutter/slider, whatever it is, and my curve got me through today.”

The fastball sat 90-91 mph, a bit lighter than his initial outing Friday. But the slider aided him with men on base. And there weren’t many. Duffy allowed six hits, all of them singles. The Rays reached second base in only one of the six innings.

Whit Merrifield provided Duffy a one-run lead with a third-inning triple splitting the right center field gap. That scored catcher Martin Maldonado, who labored around the bases after he’d reached with an infield single, sliding into first base as he beat the throw. Merrifield tripled again with two outs in the fifth, but he was left at third base with Mondesi’s strikeout, prompting the bat slam. The Royals have 17 triples in 32 games this season. Merrifield and Mondesi lead the team with five each.

The Rays tied the game in the fifth with three consecutive singles — Willy Adames, Nate Lowe and Guillermo Heredia providing the hits. Heredia was offered an extended at-bat. A 2-2 pitch was in the strike zone, but home plate umpire Kerwin Danley shouted, “No!” as it reached Maldonado’s mitt. One pitch later, Heredia blooped a ball into center field, scoring Adames.

That was the extent of the damage against Duffy.

“He had excellent control this afternoon — I mean really, really on top of his game,” Yost said. “Good changeups. Good sliders. He really commanded the ball (and) his fastball well. Really, really pleased with his effort.”