Andrew Wiggins’s layup that would have tied the score with 8.1 seconds left rolled along the rim and just kissed the backboard before it dipped off the side. The Washington Wizards already had suffered one heartbreak Wednesday night at Capital One Arena, losing rookie wing Deni Avdija in the first half to a grisly-looking right ankle injury, and to weather another in the first home game in front of fans in 13 months seemed too cruel.

But a little drama never hurt anybody.

The Wizards brought that and then some in a 118-114 win against Golden State in which they surrendered a 19-point lead in the second quarter, trailed by 11 with less than six minutes to play and capped a late barrage from Russell Westbrook and Bradley Beal with four points from Davis Bertans in the final 26.7 seconds to stave off the red-hot Warriors (29-30), winners of five of their previous six games.

The win gave Washington (25-33) eight victories in its past nine games and six in a row, its longest streak of the season.

“That was one of the wildest games I’ve coached,” the Wizards’ Scott Brooks said.

The joy of the melee, which had the 2,133 fans in the stands on their feet and dancing at various points in the fourth quarter, was tempered somewhat by Avdija’s injury. The rookie took a bad fall in the lane near the end of the first half and was taken off the court in a wheelchair.

As soon as he fell, a teammate rushed off the bench to cover his lower right leg with a towel. Brooks said he had no update on the injury after the game, though ESPN reported Avdija had suffered a season-ending fracture.

But the Wizards fought even after Avdija left. Giving in was not an option Wednesday night, not with a small but euphoric crowd spurring on the home team with the type of energy not felt in more than a year.

“Incredible,” Brooks said of the atmosphere. “You want [the fans] to see our team. Our team needs it. I think what they can see with our team is the resolve and the resiliency and a team they can be proud of.”

Capital One Arena opened its doors to fans for the first time since March 10, 2020, when the Wizards beat the New York Knicks thanks to 39 hard-fought minutes from Beal. The team restricted locker room access for reporters for the first time that day as a response to the coronavirus outbreak.

Thirteen months later, Beal dazzled again for a game-high 29 points, and locker rooms remained shuttered to outsiders. So much else had changed.

Fans were back after a long hiatus, filing into the arena in groups of four or fewer: Families with young children, post-work pairs in button-downs and slacks and groups of young people sporting jerseys from a multitude of NBA teams populated sidewalks on F and Seventh streets.

From the press section on the arena’s second tier, two Israeli flags were visible in the stands, unfurled proudly when Avdija was announced in the starting lineup and every time he hit a big bucket until he left the court. A group of four sitting in the lower level brought a homemade “Welcome Russell Westbrook” banner, commemorating the point guard’s debut in front of fans.

Washington Football Team Coach Ron Rivera and his wife, Stephanie, snapped pictures from their seats for Twitter, as did 2021′s top women’s basketball recruit, Azzi Fudd, and her future teammate, Connecticut freshman sensation Paige Bueckers.

The loudest cheer of the pregame festivities came when Mambo Sauce’s “Welcome to DC” — the song played before every home bout — blared over the sound system for the first time.

“We know covid’s been striking us like crazy, but we want to thank you all for coming out tonight,” Beal said, addressing the crowd on a microphone at center court shortly before tip-off. “We know it’s a small, little step forward, but it’s a step nonetheless. Thank you all. Hope you all enjoy the night. Remember to mask up, stay safe. Let’s go Wiz.”

From there, Washington converted the arena’s newfound energy into periods of dominance never more pronounced than in the first and fourth quarters.

In the first, it took a 38-20 lead after holding Warriors star guard Stephen Curry — who entered Wednesday averaging 31.4 points per game to Beal’s 31.1 to lead the league — to just two points (and four turnovers). Westbrook iced the frame with a three-pointer at the buzzer.

Down the stretch, Westbrook entered into attack mode and drew enough fouls to put Washington in the bonus early and have Draymond Green foul out with 2:44 to play and Golden State leading 106-104. That opened the lane up for hard drives from Westbrook, Beal and even Bertans, the three-point specialist who helped close the game from short range for once. The trio had all but three of the Wizards’ 32 points in the fourth quarter.

“Draymond fouling out was unique for us. We really needed that and guys kind of cooling down, too,” Beal said. “Can’t act like Steph didn’t make, like, 90 threes before coming in tonight, so him missing a few helped.”

Beal and Brooks also gave Westbrook his due for making Curry’s life difficult. The guard fizzled for 18 points on 7-for-25 shooting from the field. Brooks said Westbrook would not be underappreciated for his defense. The point guard agreed.

“I feel like I’m a player that can do it all,” Westbrook said. “Defend, score, whatever it is that needs to be done. My job changes every night, and I feel like I’m one of those players that if I need to defend at a high level, I can do that, too. If I need to score at a high level, I can do that. Pass? I can do that. Rebound? I can do that. You want me to coach? S---, I can do that, too.”

Westbrook finished with 14 points, 20 rebounds and 10 assists for his 173rd career triple-double.

After a topsy-turvy night of energy, joy and loss, Brooks had one message for his streaking team: Focus on the next game.

“I know we’ve won six in a row, but that has nothing to do with our next game,” Brooks said. “We have to have that same mentality: next man up, next game up and then live with the results. Knowing what I know about the group, that’s what they’re going to do.”

Read more on the Wizards: