It defies reason, because nothing about a sizably sub-.500 record indicates a team should be in the postseason picture, and yet here the Orioles are. Deservedly or not, Baltimore enters the All-Star break within reach.

As of the final out at Camden Yards on Sunday, when the Orioles beat the Kansas City Royals 8-2 to win four straight games for the first time this season, they were two games out of the final American League wild-card place.

Baltimore is five games below .500 (46-51). There are four teams between it and the third wild card. The second half of the year will remain an uphill climb requiring much-improved play from every facet of the team.

Whether this flatters them or not, though, doesn’t change the uplifting nature of this sweep.

Baltimore’s players and staff members will disperse for the All-Star break — and catcher Adley Rutschman will head to Philadelphia to appear in the Midsummer Classic — and for these four days away from baseball, the Orioles can feel a bit more bullish about their chances.

The Orioles aren’t the only team that feels this way, of course. The nature of this wide-open (read: subpar) American League is that there are many teams that can feel good about their general mediocrity.

The Boston Red Sox, for instance, fired their manager and have since surged into the hunt on the back of a nine-game winning streak. The Detroit Tigers, who remain behind the Orioles, had won eight of their last 10 games entering Sunday.

As infielder Coby Mayo said Saturday night, “it takes one good run to be right back where you want to be.” That’s the case for the Orioles. That’s the case for much of the American League.

During these few days off, though, the Orioles will emphasize their side of the equation — a feeling as though they’re in control despite an uninspiring season to this point. They got here with a sweep of the Royals (38-59), who are one of the only AL teams with little hope remaining as the trade deadline approaches.

The Orioles’ strategy at the deadline remains to be confirmed, but these four games may have helped push president of baseball operations Mike Elias toward buying — or at least a mix of buying a selling.

The offensive display this series looked more in line with what Elias expected from this group. On Friday, Samuel Basallo ripped a two-run, go-ahead home run in the eighth inning. On Saturday, Baltimore hit four more homers. And on Sunday a five-run sixth inning widened the gap and sent the Orioles on their way to a sweep.

Leody Taveras delivered the first blow. In the second inning against right-hander Seth Lugo, Taveras slaughtered a pitch 448 feet for a two-run shot — the longest homer of Taveras’ career.

He returned in the sixth to deliver an RBI single against left-hander Matt Strahm, and things unraveled for Strahm from there.

The southpaw conceded an RBI double to Jeremiah Jackson, a balk to bring home another run and an RBI infield single to Gunnar Henderson before he was pulled. With right-hander John Schreiber on the bump, Pete Alonso drove an RBI single to right field to cap the onslaught.

Just for good measure, Basallo hit his 16th homer of the season in the seventh inning. And to add a bit of fire to a game that crawled to an ending, the benches cleared when infielder Blaze Alexander jawed at right-hander Lucas Erceg one plate appearance later.

In a 1-2 count, the seventh pitch of the battle plunked Alexander on the left hand. Erceg, who looked to quick pitch Alexander before the batter was ready, lost control of a fastball. After dropping his helmet, Alexander yelled at Erceg.

The benches cleared, and manager Craig Albernaz initially held Alexander back before bench coach Donnie Ecker pulled Alexander away from the scene. There were no ejections, and Alexander, who reached base four times with two singles and a walk, was lifted for Mayo to pinch run.

That added excitement to a game that was all but over.

Earlier, right-hander Shane Baz allowed one earned run in 4 2/3 innings, and another run crossed after an error. Both came on high choppers that sneaked through the infield in the second and third innings.

With his pitch count at 104 in the fifth inning, Baz’s start was cut short. The line of relievers behind him held Kansas City down.

Some of the success this weekend can surely be placed on the opponent. The Royals are one of the worst teams in a bad American League. But, for the Orioles even to think about a late postseason run, they must beat up on the bad teams.