Cole Irvin was in a pickle.

The Orioles had a two-run lead, and Irvin had loaded the bases in the top of the fourth after walking Vaughn Grissom. The fate of the game could change in one bad pitch.

But Irvin did what he’s done in his last five starts: he found a way through. In a seven-pitch battle with Dominic Smith, Irvin unleashed a fastball in the top corner of the zone to get Smith looking. Then he threw three curveballs to get Ceddanne Rafaela swinging, ending the inning and the threat.

“Really good job of pitching when the game was still unbalanced,” manager Brandon Hyde said. “For him to leave with a zero there, make some big pitches when he needed to because if he doesn’t get out of that inning our bullpen completely changes on a day when we would love to stay away from people.”

The Baltimore Banner thanks its sponsors. Become one.

The Orioles offense took it from there, scoring five runs in the bottom of the fourth as Baltimore beat the Red Sox 11-3 in the first of a three-game series. The Orioles — who less than a week ago were swept in the regular season for the first time in two years — have now won five in a row and all four of their matchups against the Red Sox so far this season.

“That was, for me, one of the more complete offensive games of the year,” Hyde said. “Using the whole field, hitting with runners in scoring position. The way we ran the bases was fantastic, moving them over and getting them in. Played really good situational baseball, so that was really nice to see our offense have a complete game today.”

Earlier this month, Irvin was on a roll, allowing just four runs in his last five starts. He said it was the best he had felt in his career. But to make room for Grayson Rodriguez to come back from the injured list, the Orioles opted to move Irvin to a bullpen, a role he took on multiple times last season.

The team pondered going to a six-man rotation during this stretch of 45 days with only two off days — which would have given Irvin a place as a starter — but then injures again hit the team. John Means, who had Tommy John surgery two years ago and missed the playoffs last year with elbow soreness, was placed on the injured list on Friday and is getting a second opinion. Dean Kremer was added on Friday with a right triceps strain.

So Irvin was moved back in the rotation for Monday’s game, and he didn’t disappoint. Irvin gave the Orioles five shutout innings, allowing just four hits while striking out six.

The Baltimore Banner thanks its sponsors. Become one.

“It’s not easy, but at the same time that’s what I’m asked to do,” Irvin said of switching roles. “So I have to find a way to make it easy. Mentally just stay locked in and focused on what I knew how to do in my routines, day in and day out. That’s what allows me to be consistent, whether in a starting role or a relieving role.”

He last pitched on May 22, throwing 56 pitches out of the bullpen. He said it took him a few innings on Monday to feel like himself, but by the fourth, when he found himself in that jam, he was back in it.

His efforts in that inning to keep it a two-run game shifted the energy back to the Orioles. Then the stadium watched as relish won the first-ever live hot dog race, bringing the crowd to its feet. They stayed up as Ryan Mountcastle hit a double, Colton Cowser reached on an error, Jordan Westburg walked and Kyle Stowers hit an RBI double. It didn’t end there: Cedric Mullins hit an RBI triple, and Jorge Mateo a sacrifice fly. The close 2-0 game was suddenly 7-0 as the Orioles drove out Boston’s starter Cooper Criswell, who until Monday had not allowed more than three earned runs in a start this season.

“it was really fun for me to have a big day, fun for the team to get a win,” said Stowers, who had a personal-best four RBIs and tied his career-high with three hits. “A long road for me to get back here. It’s cool to have a big moment today and most importantly happy to get the win and keep going.”

By the time the eighth came around, the Orioles had an 11-0 lead, more than enough insurance to try out new reliever Thyago Vieira, who was acquired from the Brewers on Saturday. And well, it’s a good thing they had a cushion. Vieira walked four and allowed an RBI triple, not getting an out before he was removed.