KANSAS CITY — The hard part was done. The Orioles bats got to burgeoning star Cole Ragans, and Corbin Burnes cruised through the Royals lineup.

Baltimore decidedly won the battle of the aces. And yet its 9-7 victory felt, in some ways, like a loss.

After the Orioles tagged Ragans for seven runs in just 1 2/3 innings, the O’s appeared on their way to an easy, series-evening victory. But, after manager Brandon Hyde let Burnes face one batter too many, then made a series of questionable pitching decisions, Baltimore found itself holding on for dear life.

Thanks to late insurance from the offense and two scoreless innings from Keegan Akin, Michael Baumann and Craig Kimbrel, the Orioles sneaked out a win on Saturday.

The Baltimore Banner thanks its sponsors. Become one.

“That’s not how we drew it up there, the last few innings on the mound, unfortunately” Hyde said. “We gotta be a little better than that going forward if we’re gonna compete.

“It’s a little sour taste right now.”

Despite its tense finish, the game looked, for a time, to be another example of Hyde’s wily decision-making.

Two and a half weeks after his lineup was held scoreless on just one hit by Ragans, Hyde decided to run out the same nine position players as he did in the Orioles’ 4-3 win over the Royals on April 3, albeit in a slightly different order. That right-handed-heavy group delivered, batting around in a seven-run second inning that knocked the lefty Ragans out of the game.

Second baseman Jordan Westburg kicked things off with a single and a stolen base, coming around to score the game’s first run on a double by Ramón Urías. About 20 minutes later, Westburg’s two-run single was the knockout blow, putting the O’s up a touchdown and forcing Ragans out of the game. Both Westburg hits came on two-strike pitches.

The Baltimore Banner thanks its sponsors. Become one.

“Just trying to be a tough out” Westburg said. “Not giving up on any at-bats. I make some changes. I make some mental changes. So there’s some effort that goes into it, certainly some luck.”

In that delirious second frame, Orioles batters collected eight hits and a walk against Ragans, who entered the night with a 1.93 ERA. Two of the hits — Adley Rutschman’s single and Anthony Santander’s double — were clocked at 105 mph off the bat. But they did it all without the benefit of a home run.

“That was one of our best innings offensively of the year, for me,” Hyde said. “Facing a really good starter who’s had a lot of success, a lot of success against us, and I thought we just took what was given to us. A lot of singles, a lot of using the whole field.”

“We made the adjustment from the first game,” said Santander, who hit three doubles and collected two RBIs. “He’s a guy who likes to attack early in the count and we talked about it before the game, and we did a pretty good job attacking him in the second inning.”

Burnes, meanwhile, coasted through the first five innings, allowing just two hits and no runs. But after Burnes surrendered a double to Maikel Garcia and a walk to Vinnie Pasquantino in the sixth, Hyde gave his workhorse starter a chance to finish the inning. It backfired, as Kansas City catcher Salvador Perez blasted a three-run homer into the bullpen in left field. A 7-0 lead became a 7-3 lead.

The Baltimore Banner thanks its sponsors. Become one.

“It’s too bad that sixth inning happened,” Hyde said. “He was absolutely fantastic.”

“He’s a veteran hitter, and he’s got me both times we played him,” said Burnes, who surrendered a pair of RBI singles to Perez when these teams met in early April. “He’s got five hits over the last two games, so he’s obviously seeing the ball well off of me. But I felt like it was a pretty good pitch, probably just went in there too many times with two strikes, probably just gotta expand a little bit. But, for the most part tonight, we were able to limit the contact and get some quick outs.”

After the Orioles got an insurance run in the top of the seventh to make it 8-3, Hyde sent Yohan Ramírez in for Danny Coulombe with a runner on second and one down in the bottom half. Just as Akin did the night before, Ramírez, then Yennier Cano, collapsed.

What the pair of righties turned in was calamitous: hit by pitch, wild pitch, wild pitch, walk, single, single, walk, single. When the frame was over, the Royals had pulled within a run.

Friday night’s bullpen meltdown was painful but palatable. The Orioles struggled to get going for the first six innings of the team’s Game 1 loss. When Akin and Dillon Tate allowed six earned runs in just 1 1/3 combined innings, it was easier to chalk the 9-4 loss up to unlucky bounces, offensive inefficiency and uncharacteristic performances.

The Baltimore Banner thanks its sponsors. Become one.

Saturday’s game, however, showed how thin the line can be between a blowout and a nail-biter. Each of Hyde’s decisions was, in itself, understandable: allowing Burnes to get to finish six innings, bringing in a rested Ramírez in an apparent blowout, calling upon Cano to put out the fire.

But they nearly spelled disaster, and the Orioles, who are working with a shallow bullpen while they wait for starters John Means, Kyle Bradish and Tyler Wells to return from injury, are teetering close to calamity on a near-nightly basis.

One consistent bright spot has been Kimbrel, who recorded his 422nd career save, tying him with Billy Wagner for seventh on the all-time list. Colton Cowser, who came into the game to play left field when Austin Hays experienced calf soreness, caught the final out, then “yeeted it” into the fountains beyond the fence without realizing the ball’s significance.

“Right when I threw it, I said, ‘Craig has a lot of saves, that one might’ve been important,’” Cowser said sheepishly. “I literally told [Cedric Mullins], I said, ‘I might’ve messed up.’ And turns out I did.’”

Fortunately, the staff at Kauffman Stadium retrieved the ball from the fountain and Cowser returned it to the O’s closer. But the outfielder will not live this down in the clubhouse.

“Every time I catch a ball that’s the last out from now on, it’s staying in the glove.”