DETROIT — It wasn’t an offense explosion.

But, a night after being one out away from getting no-hit, the Orioles got production from their offense. They beat the Tigers 4-2 behind eight hits and a seven-inning, two-hit starting pitching performance from Corbin Burnes on Saturday.

“This was a big win for us,” catcher James McCann said. “It’s no secret that the ball hasn’t been bouncing our way, that things haven’t gone our way, but one thing about this clubhouse, we’ve stayed close through it all. We are going to keep driving together. We understand that it’s a marathon of a season. We’re not going to let one month, two months define us. It’s one of the strengths of this team. We are going to keep fighting and keep doing everything we can to get better.”

This win, like any win this time of year, was critical, especially after the Orioles dropped five of their previous six games. Their magic number — the combination of their own wins and losses by the team with the seventh-best record in the American League — to claim a playoff spot drops to six.

The Baltimore Banner thanks its sponsors. Become one.

Wednesday, at home against the Giants, is the earliest they can clinch. And, with the Yankees falling to the Red Sox, the Orioles move up a game and now sit two games behind in the American League East.

They are trying not to put too much pressure on themselves, but they know how important these games are.

“Obviously games feel bigger,” McCann said. “Yes, it does feel bigger, but at the same time we can’t let it feel that way to where it consumes us.”

For the Orioles, who despite their scuffle have maintained over a 99% chance of making the playoffs, getting momentum might be even more dire, because that’s the only way they’ll go far once October hits.

Burnes, who ended August with a 7.36 ERA for the month, has steadily returned to his ace form in September, right when the team needs it most. On Saturday, he put together his best performance yet, pitching a scoreless outing for the first time this season.

The Baltimore Banner thanks its sponsors. Become one.

Shortstop Gunnar Henderson rounds the bases on his home run in the seventh inning. (Duane Burleson/Getty Images)

“If I can go out and execute pitches and command the cutter and spin the ball the way I want to, I can do this on every given night,” Burnes said. “Month of August, we didn’t do that. I left a lot of balls up. I left a lot of balls over the plate. So just a matter of kind of honing in on the mechanics and sequencing and getting the ball where I wanted it to [go]. I know that I can get that cutter at the bottom of the zone.”

Burnes allowed just two hits, both to Colt Keith, walked one and allowed no stolen bases for the first time this month. He ended his day by striking out Wenceel Pérez, an amped Burnes’ fist pumping as he walked off the mound.

“That’s what your ace does, right?” McCann said. “That’s what your No. 1 does, stops the bleeding. He gave us a chance to win. ... Burnes threw the ball extremely well today.”

Burnes’ performance was a promising sign for the Orioles, just as their offensive showing was. They found a way on base right away, Gunnar Henderson and Cedric Mullins walking to open the first. They got a hit in the second, when Ryan O’Hearn singled, just his third hit in his last 29 at-bats. And they really got going in the third, when Henderson doubled and Mullins drove him home with a single, the top of the Orioles’ lineup lighting the spark just as it has all month.

The Orioles added three runs in the seventh, when McCann hit a sacrifice fly and Henderson hit his 37th home run of the season.

The Baltimore Banner thanks its sponsors. Become one.

“Mac doing a great job putting the ball in play with two strikes in a second-and-third situation after the [Liván] Soto double,” manager Brandon Hyde said. “And then Gunnar just getting a pitch to hit and putting an exclamation point on that inning. Anytime we can create some separation runs-wise, as you saw in the ninth inning, the better we’re for it. That’s something we’ve had a tough time with this year, and it was a huge hit for us at the time.”

Things got a little bit dicey in the ninth, when, with Yennier Cano dealing with soreness, the Orioles went to Seranthony Domínguez in a non-save situation. He let in two runs but stranded two runners to wrap up the win.

Emmanuel Rivera of the Orioles scores past catcher Jake Rogers of the Tigers in the seventh inning. (Duane Burleson/Getty Images)