CHARLOTTE — On a night when it rained three-pointers in ­Spectrum Center, both the Washington Wizards and Charlotte Hornets needed to defend the perimeter on high alert.

An old-fashioned three-point play, however, was ultimately the biggest.

The Hornets won, 114-107, on Tuesday night after guard ­Devonte’ Graham gave his team some needed breathing room by playing the inside game. Graham, who connected on six of his team’s 16 three-pointers, changed things up with 1:34 remaining and the Hornets leading by one. His drive and finish through a foul against Wizards center Moritz Wagner put ­Charlotte ahead by four.

Although the Wizards stayed close near the end, the Hornets never lost hold of the game. Charlotte forward Miles Bridges found an open look in the corner with 7.7 seconds remaining, and his three-pointer secured the win as the Wizards fell to 7-16.

“We made some costly mistakes,” Washington Coach Scott Brooks said. “We gave them too many and-ones.

“We played hard,” Brooks continued. “We couldn’t make any important shots down the stretch, but we made so many shots during the game.”

To be specific, Davis Bertans made so many shots. The ­Wizards, as a whole, did not.

Bertans continued his personal hot streak by scoring a career-best 32 points on 11-for-18 shooting. While Bertans made eight three-pointers, another career high, on 12 attempts, the rest of the team shot 3 for 23 from deep.

“He saved us and bailed us out, yes,” the Wizards’ Bradley Beal said. “And we can’t live like that, honestly. I mean, it’s great that he’s able to do that, but if we want to win and be in the playoffs and be that type of caliber team, we can’t just depend on D.B. to make those shots. But it’s great that he does.”

Throughout the game, the Hornets opened double-digit leads with their three-point shooting. It was a team-wide strength: Graham stepping back and drilling a deep shot over Chris Chiozza, P.J. Washington fanning out to the corner and the top of the key, and even center Cody Zeller, who has made only 14 three-pointers this season, celebrating with his arms spread wide after joining the party.

Six Hornets players made at least one three-pointer. The Wizards didn’t have such depth on this night, but they didn’t need it to stay in striking distance. ­Bertans was their one-man triple threat.

Washington tied a season low with 48 points in the first half, shooting 3 for 13 from beyond the arc. Bertans accounted for a pair of those makes, including one on a four-point possession to give the Wizards a brief 43-42 lead.

By the start of the fourth quarter, Washington needed a comeback. Normally, the 82-75 score would have indicated danger, because the Wizards had a 1-14 record when trailing after the third. But Bertans was on the floor, and his shooting touch helped turn the momentum again.

He made a 10-footer on the Wizards’ first possession of the quarter to cut the deficit to five. Unflinching, Bertans then pulled up from 28 feet on the next possession while being defended by Nicolas Batum. He drilled the shot, took the foul and threw the Wizards’ bench into a frenzy, so much so that Beal feigned unconsciousness, passing out on the baseline as rookie Rui Hachimura pumped on his chest to bring him back to life.

“The hoop is just giant,” Bertans said, describing the shooting trance he has experienced lately. “You feel like everything you throw that direction is going in.”

The play was part of a 17-0 run that culminated in Chiozza making a three-pointer to give the Wizards an 84-82 lead with 9:52 to play.

In a duel between an all-star shooting guard and one rising to respectability, Graham finished with 29 points while Beal made just 6 of 19 shots for 16 points but added a team-best nine assists.

Beal again spent portions of his night fighting for respect.

After Sunday’s loss to the Los Angeles Clippers, Beal expressed his outrage — albeit in a monotone manner — about his perception of “unfair” officiating. Beal does not believe he has received equity in foul calls, and his season-long complaint reached a boiling point when the Wizards picked up three technical fouls arguing for whistles.

“We know that everybody doesn’t respect us with the greatest of respects in this league,” Beal said. “And that’s other teams, and that’s refs included.”

In Charlotte, Beal commanded respect and earned it.

Mostly.

He had pledged to play even more physically in an attempt to get calls, and with 2:44 remaining in the first half, he initiated contact against Hornets forward Batum. Although Batum bowled over, Beal’s aggression was rewarded with a trip to the foul line. Beal attempted four free throws in the half.

Later in the second quarter, Beal didn’t get the same respect on another drive to the rim. This time, he ended up on the floor without a whistle and spent the closing seconds of the half fuming in protest.

When Beal scored with 3.6 seconds remaining, he immediately turned to the nearest official, Mousa Dagher, and demonstratively pumped his fist toward him. The gesture led to Beal’s fourth technical foul of the season, and Beal would only attempt one more free throw for the rest of the game.