TORONTO — They were teammates only days ago.

In the ever-changing baseball world, though, they now stood facing each other, one in the road gray on the mound and the other in the home white in the batter’s box — both on new teams, pitted against each other immediately.

The newest addition to the Orioles, right-hander Jack Flaherty, spun a deadly knuckle curve that turned former teammate into latest victim in the second inning Thursday, when Paul DeJong’s swing left him lurching into empty air.

“Definitely laughed when I saw him come up for the first time,” Flaherty said of DeJong. “But it was good ,to get him.”

The Baltimore Banner thanks its sponsors. Become one.

DeJong wasn’t Flaherty’s only prey.

The trade-deadline acquisition, added to reinforce a rotation that has teetered as the season prolonged with a veteran arm, impressed in his Orioles debut, powering his new club to a 6-1, series-clinching victory at Rogers Centre. In doing so, he rode the adrenaline that comes with pitching for the American League’s best team.

But Flaherty gave as much of a lift to Baltimore as Baltimore gave him. By completing six strong innings against the Toronto Blue Jays, for at least one start Flaherty backed up the expectations that followed him from the St. Louis Cardinals.

He finished Thursday’s finale with just one run against him, escaping a bases-loaded jam in the sixth to prevent an otherwise standout performance from spiraling late.

“It was fun. New energy, new everything, and sometimes that can be a little bit tricky, but [catcher] Adley [Rutschman] was awesome back there and the coaching staff was great getting me prepped for it,” Flaherty said. “I didn’t really have a lot of time to get prepped for these guys. I normally take a handful of days to do it. Everything was rushed together. But he did a really good job of calling the game.”

The Baltimore Banner thanks its sponsors. Become one.

Flaherty’s 2023 campaign for St. Louis was a mixed bag. He joined the Orioles with a 4.43 ERA, although his July was much improved — in four of five starts, he allowed three runs or fewer. The Orioles, however, saw the 27-year-old as the addition that could push them toward a division title and into October. With three postseason starts in 2019, Flaherty is already Baltimore’s most experienced playoff arm. He has a track record of eating innings.

While the young arms around him approach or surpass career highs — and experience the uncertainty that goes with that uncharted territory — Flaherty has proven his ability to traverse a seven-month schedule.

Now, he’ll try to finish what he began in St. Louis by driving Baltimore (67-42) toward the postseason.

“We still have a long way to go,” manager Brandon Hyde said, “but love the way we’re playing.”

The challenge around Thursday’s start was that Flaherty arrived in Toronto a day before he took the mound for his debut. There was little time to coordinate his game plan with the Orioles’ pitching staff and Rutschman, so it devolved into a game that followed Flaherty’s lead.

The Baltimore Banner thanks its sponsors. Become one.

What he felt, he’d throw. And, for the most part, what Flaherty felt worked. Flaherty also credited the back and forth with Rutschman, leaning on the catcher’s knowledge of Toronto’s hitters, given how frequently these teams face each other.

“Most of it was before the game, but just as the game went along, kind of seeing how he felt with different stuff, what he wanted to try,” Rutschman said. “Slowly kind of sync up as the innings went along, having those conversations after innings, and figuring out what we wanted to do and his style.”

Flaherty allowed a leadoff single and walk, then worked out of the first-inning jam with a flyout and two strikeouts. His four-seam fastball reached a season-high 97 mph, and his slider and knuckle curve bamboozled hitters. By the fourth inning, Flaherty had forced swings and misses on 11 of the 23 hacks batters attempted. He finished with 19 whiffs, his second most this year.

Flaherty retired 15 in a row after that first-inning walk, with DeJong one of his eight total strikeouts, before allowing his second hit of the day in the sixth. That streak made Flaherty the second Orioles pitcher to retire 15 or more consecutive batters in his first game with the team, joining Dave McNally with 17 in his 1962 MLB debut.

Much like the first, Flaherty found himself in a jam. A bloop single to right field from Vladimir Guerrero Jr. brought home one run, but Hyde trusted Flaherty to escape his own mess. So, with bases loaded and one out, Flaherty remained, and a knuckle curve caught Matt Chapman for a strikeout. Then a fly ball stranded all three runners, maintaining Baltimore’s advantage.

The Baltimore Banner thanks its sponsors. Become one.

“When things are going smooth and easy, that’s one thing,” Rutschman said. “But when you get into a pinch there with bases loaded, and to be able to get out of that and keep his composure and make quality pitches, that definitely says a lot.”

The Orioles gave Flaherty the lead early, when Austin Hays and Rutschman drove RBI singles off right-hander Kevin Gausman. Ryan Mountcastle, who finished with 11 hits during this four-game series, added a sacrifice fly that played a part in Gausman’s early exit. They tacked on three more late as insurance.

Mountcastle, as ever, performed at a high level against the Blue Jays. Hyde joked he’d hang a Rogers Centre banner in his locker to “remind him what it feels like to hit here.” Since returning from a vertigo-induced injured list stint, Mountcastle is 23-for-50. Rutschman called him “unconscious,” Hyde said it was the best four-game set he’s seen from the first baseman, and Mountcastle shrugged.

“It’s easier when you’re just seeing one baseball instead of three,” he said.

The rest was down to Flaherty and the bullpen, who did their part. The nerves that surrounded Flaherty’s first professional start for a team other than the Cardinals washed away in six standout frames.

The Baltimore Banner thanks its sponsors. Become one.

It was just one start, the first of many Flaherty will make down the stretch. But starting on the right foot gives an early belief that the trade to acquire the right-hander is a net positive in the present — a way to bolster the Orioles’ rotation for all that is to come.