BOSTON — They all knew it.

That resounding crack in the bottom of the 10th inning was instantaneously identifiable as a walk-off, three-run homer from Tyler O’Neill that drove the Boston Red Sox to a 5-3 victory against the Orioles.

This has been the way of the Orioles for two months, a one-step-forward-one-step-backward dance that leaves them mired in the same place. The win Tuesday — a complete team performance that featured another strong start from Albert Suárez — felt much needed after the collapse of Monday against the Red Sox.

But, after Tuesday’s win, the Orioles couldn’t build a semblance of momentum Wednesday. They dropped to 25-26 since the All-Star break. Baltimore entered this series a half-game back of the New York Yankees for the American League East lead and exits it with a 1.5-game deficit. The Orioles dropped a second straight series against a divisional foe already out of it and left to play spoiler.

The Baltimore Banner thanks its sponsors. Become one.

Dean Kremer allowed one earned run in seven innings, striking out seven. (Winslow Townson/Getty Images)

“Losing sucks, no matter the circumstance,” right-hander Dean Kremer said. “But, yeah, definitely, dropping a series like this definitely hurts. But looking forward to the next one and trying to pick up momentum and finish the season strong.”

The spoiling Wednesday came late, but it was a trickle-down from the eighth inning. Right-hander Yennier Cano entered with two outs in the eighth and needed two pitches to strand two inherited runners. But Cano, who threw 15 pitches Tuesday, didn’t continue in the ninth; right-hander Seranthony Domínguez took that frame.

Domínguez pitched a clean inning, despite a runner reaching second, but using him there meant Domínguez, the new closer, wasn’t available for the 10th inning with a lead. Left-hander Keegan Akin, who has pitched well this season, was charged with the save situation.

The pressure compounded when second baseman Jackson Holliday made an error on a grounder that left runners on the corners with one out. Manager Brandon Hyde said that “errors happen” and the team needs to rebound from it, but it changed the scenario with O’Neill at the plate.

“You don’t want to walk him and load the bases for somebody and put the winning run at second base,” Hyde said.

The Baltimore Banner thanks its sponsors. Become one.

O’Neill, though, has extreme splits. He’s far superior against left-handed pitching, entering with a .317 average and 1.165 on-base-plus-slugging percentage when facing southpaws. Outfielder Masataka Yoshida, a left-handed hitter, was on deck after O’Neill and entered with a .598 OPS against lefties. Hyde, though, was reluctant to load the bases with one out, especially with the option for Boston to pinch hit for Yoshida with Rob Refsnyder.

“You’ve still got Refsnyder over there, too,” Hyde said. “I could bring [right-hander Matt] Bowman in there with the bases loaded. Hoping we wouldn’t give O’Neill something good to hit.”

But Akin did. He missed with a slider on the inner half of the plate, and O’Neill belted it for his 30th homer of the year.

“Just made a bad pitch,” Akin said. “Paid the price for it. Had to be at a crucial point in the game, obviously. But it’s baseball; it’s going to happen.”

The Orioles held a lead entering the bottom of the 10th because of Emmanuel Rivera’s two-RBI day. Rivera homered in the third inning and chopped a single through the infield that plated Austin Slater, the automatic runner, to begin extra innings.

The Baltimore Banner thanks its sponsors. Become one.

Getting the start at third base after prospect Coby Mayo got the nod for the first two games of the series, Rivera lifted a hanging breaking ball from right-hander Nick Pivetta to the seats atop the Green Monster. When the Orioles signed Rivera, it was to bring in a glove-first corner infielder. But Rivera is hitting .321 since arriving and his homer gave the Orioles an early lead.

His defense, of all things, let him down just one inning later. Rivera charged a weak ground ball to third, gloved it and threw to first. But his throw bounced in, eluded Ryan O’Hearn and brought home one.

A second and final run came in against right-hander Dean Kremer in the fourth when Masataka Yoshida led off with a double, Trevor Story walked with two outs and Ceddanne Rafaela lashed a line drive RBI single into left.

Beyond those two runs, Kremer put together another standout appearance. Last week, despite being hit on the forearm by a 103.1 mph line drive against the Colorado Rockies, Kremer returned without missing a start and pitched six scoreless frames.

Kremer completed a season-high-tying seven innings, retiring the last 10 batters he faced. He struck out seven, walked two and allowed five hits. He gave his team a chance — but it didn’t maximize the quality start with much run support.

The Baltimore Banner thanks its sponsors. Become one.

“I gave the team a chance to win,” Kremer said. “It’s my job. I feel like I accomplished it tonight.”

Anthony Santander clobbered his 41st home run of the season into the visitor’s bullpen in the eighth inning to knot the score again. But the Orioles didn’t add anything from there and went to extras once Domínguez evaded trouble in the bottom of the ninth.

And, although Baltimore scored in the top half, O’Neill’s homer left the Orioles with a second straight series loss. There are 15 games remaining for Baltimore to figure out its seesaw form. On Tuesday, many players within the clubhouse declared their confidence in each other and their ability to turn things around.

But, when Kremer was asked what could change to get the team back on track, he didn’t have an answer.

“I wish that was my job to tell you, but that’s not my job,” Kremer said. “My job is to go out there and pitch. That’s a question for the higher-ups, the guys who make the decisions of who plays, who doesn’t play and all that stuff. So I wish I could tell you, but I got no answer for that.”

The Baltimore Banner thanks its sponsors. Become one.

Orioles shortstop Gunnar Henderson throws out Jarren Duran of the Red Sox in the first inning. (Winslow Townson/Getty Images)