Wizards guard John Wall battles for a loose ball between Cavaliers guard Kyrie Irving, left, and center Tristan Thompson during Washington’s 140-135 loss to the defending NBA champions. (Toni L. Sandys/The Washington Post)

Over the past two months, the Washington Wizards have fortified their regular season with a devotion to team basketball, a growing fondness of defense and a grasp so tight on their home court that no opponent could undo it. On Monday night, this foundation proved to be so strong that only an otherworldly shot from LeBron James and a dagger from Kyrie Irving could send cracks through it.

The Wizards fell, 140-135, in overtime to the reigning champion Cleveland Cavaliers, an epic game fit for the playoffs but played in early February. The loss ended the team’s 17-game home winning streak, but out of the rubble, the Wizards (30-21) earned respect.

“A lot of people respect the effort we gave,” Wizards guard John Wall said, his adrenaline still high from almost 45 minutes of nonstop action, “and it was probably one of the best games of the year.”

The Wizards showed their teeth and snarled at the champions.

“This is more of a playoff game than anything,” guard Bradley Beal said. “That was definitely a test and a battle for us. I think we did a tremendous job handling it.”

Beal made aggression into an art form, scoring against any defender Cleveland threw his way. He skated around 36-year-old Richard Jefferson, did the same against the Cavaliers’ top wing defender, Iman Shumpert, and torched the perimeter for six three-pointers en route to a game-high 41 points.

And Wall — who told anyone who would listen that Monday would be the biggest regular season matchup of his seven-year career — expertly shifted from facilitator to clutch-time captain, keeping a shooter like Otto Porter Jr. in lights-out mode (5 of 7 from the arc for 25 points) and then scoring six late points including a pair of free throws that extended the Wizards’ lead to 120-117 with 3.4 seconds remaining in regulation.

“We gave ourselves a chance,” Wall said, “but we let it slip away.”

The first slip up — or simply a stroke of bad luck — happened as Cavaliers forward Kevin Love threw the ensuing inbounds pass down the court and found James, who had missed an open layup on Cleveland’s previous possession.

With his back to the basket and Beal right in his breathing space, James had the ball and little time to react. The Wizards believed he stepped out of bounds near their bench, but instead he turned and banked in the game-tying three with 0.3 seconds left.

“I know everyone in the crowd, everyone here, too, was shaking their head like, ‘What a shot, man!’ ” Irving said. “Just incredible.”

Though the game moved into overtime, the Wizards still felt empowered. From the moment the tip went to Wall, to the opening seconds when James picked up his sixth and final foul, and even through the next possessions as Kelly Oubre Jr. drilled a three to give the Wizards a 127-122 lead, Washington still felt in control.

“Of course I thought we were going to win,” Wizards forward Markieff Morris said. “I thought we were going to win when [James] fouled out.

“We had a lot of faith. That’s one thing about us. We kept faith the whole game.”

The Wizards have held this type of belief since the start of the season, when losses piled up and when they were viewed as an undesirable prime-time matchup and had one nationally televised game removed from the network schedule. The Wizards were not only featured on TNT on Monday night, but Las Vegas had them as one-point favorites over Cleveland. Then with four minutes to play, the King sitting on the bench and a five-point lead resting in their hands, the Wizards believed.

But the Cavaliers “didn’t win a championship being down 3-1 for nothing,” as Coach Scott Brooks later said.

Cleveland simply turned to another superstar in Irving, and with the score even at 133 he calmly accepted Beal’s one-on-one challenge. Irving had shot poorly throughout the night but pulled up for the dagger three-pointer with 35 seconds to play.

Though Love led his team with 39 points, Irving had the biggest moment and finished with 23 points (8 of 24 from the floor), while James produced 32 points and 17 assists.

Despite the disappointing ending, Wall said James paid the ultimate compliment earlier in the game.

“Y’all playing some hell of a basketball right now,” Wall said James told him.

Wall seethed as he untied his pink sneakers, cursing to himself, still fired up and wanting to play more basketball. The game was over and he was on the wrong end of an “instant classic,” as his coach called it, but the Wizards had earned a consolation prize.

“I think they respect us,” Wall said.