KANSAS CITY, Mo. >> The Twins missed opportunities at the plate and made mistakes in the field, spoiling Bailey Ober’s return to form and costing Minnesota a chance to split its four-game series against the Royals.

Bobby Witt Jr. hit a tie-breaking sacrifice fly in the bottom of the seventh inning Thursday afternoon to cap a two-run rally against reliever Cole Sands in a 3-2 Royals victory at Kauffman Stadium.

Ober entered with a 12.15 earned-run average in two starts after an illness set him back, causing him to lose nine pounds temporarily. Against the Royals, he looked more like 2024 Bailey Ober, allowing a run on five hits and a walk to go with four strikeouts over six innings.

He appeared to have more stamina this time after pitching a total of 62/3 innings coming in.

“Definitely felt a lot better today,” Ober said. “Hopefully I’ll just keep on getting better.”

Protecting a 2-1 lead, Sands got the first out of the seventh but hit Freddy Fermin with a pitch. Drew Waters hit a sharp single that put runners at the corners, and Sands lost a 10-pitch at-bat against Jonathan India, who stroked a soft single to left tying the score.

Witt worked the count to 2-2 before flying out to deep center, pushing Fermin home. Before that, Sands had not allowed a run in five appearances.

“I’ll bet on Cole going out there and putting up a zero every time,” manager Rocco Baldelli said. “I’ll put my money on him getting the job done.”

The Twins put runners at first and second with one out in the ninth, but Matt Wallner struck out and Willi Castro grounded to first against closer Carlos Estévez. The Twins, who stopped a three-game losing streak behind Joe Ryan’s dominant outing Wednesday, could not gain a split in the four-game set.

“I think three of those games we should have won or could have won,” said catcher Ryan Jeffers, who drove home Trevor Larnach with a go-ahead single in the sixth. “We just couldn’t finish out a couple of the games.”

The Twins drew five walks and had three extra-base hits, including another home run by Ty France, but they also went 1 for 9 with runners in scoring position and stranded eight.

They also suffered lapses running the bases and on defense.

India threw out Edouard Julien at the plate in the second inning after making a diving stop and spinning to throw home on José Miranda’s grounder against Michael Wacha. Julien, running home on contact, took the blame.

“It was a bad slide,” Julien said. “I was running, the bat was on the right (of the path) and I didn’t want to slide head-first on the bat. I was going to slide head-first because it was probably going to be a tighter play. Bad slide.”

Catcher Freddy Fermin also made a great tag, and it’s possible Julien would have been out regardless of his indecision, Baldelli said. But he also agreed on the slide.

“You’ve got to go directly into the plate, go hard, and not get checked up,” the manager said. “We don’t need a slot to go around the catcher or anything like that, just directly get to the plate as fast as we can.”

The Twins, trying to build on France’s second solo homer in the past two games earlier in the inning, had squandered Julien’s double and the error that helped him reach third base.

“If I had to do it again, I would have just gone straight home and chose one, not two slides,” said Julien, who went 1 for 3 with a walk. He also lamented striking out with two runners aboard in the sixth. Baldelli said Julien wasn’t the only one failing to convert opportunities into runs.

“It’s an at-bat or two here or there, but we have to turn those in our favor,” Baldelli said.

Ober filled the zone with 53 strikes on 73 pitches before giving way to Sands. Baldelli said the time was right to swap pitchers, considering Ober’s irregular season so far.

“He pitched us to a great spot,” Baldelli said of his starter. “You can turn it over to our bullpen, which I maintain is a good bullpen.”

Sands threw a lot of cut fastballs and said, perhaps, he should have used his split-finger more. It had been effective. “Maybe looking back, maybe trusting that pitch a little bit more vs. just relying on some of the other things,” he said.

The Twins fell to 4-9 this season. They open a homestand Friday against the Detroit Tigers.