When the Madison girls’ basketball team came within one game of winning a state championship last year, the players envisioned a victory would look like this: Rushing the court at Virginia Commonwealth University’s Siegel Center, hundreds of fans cheering and lots of hugs.

Madison lost the chance to claim that outright championship when the game was canceled because of the pandemic. But the players realized their dreams of winning a Virginia Class 6 championship Saturday night — just in a different environment.

When the buzzer sounded on the Warhawks’ 54-48 win over Osbourn Park in their home gym in Vienna, a handful of spectators cheered and Madison’s players clapped in a group without touching each other. Then they watched the trophy presentation from the bleachers, where they spread out.

Nonetheless, the Warhawks couldn’t have envisioned a finer finale to an uncertain season. Madison won its fourth state championship and first outright crown since 1993, when Coach Kirsten Stone played for the Warhawks.

“I’ve always dreamed of playing in college and being in the WNBA in a big stadium like [VCU],” Madison guard Amalia Makrigiorgos said. “But this one’s better because last year didn’t happen. I couldn’t ask for anything better.”

After last year’s state championship game was scratched and Madison was named ­co-champion with Edison, Stone didn’t know whether she would ever get over that lost opportunity. Her players didn’t, either. They cried when they learned about the cancellation last March.

And the Warhawks (16-1) didn’t think they’d get another opportunity this year. When Virginia started a condensed season in late-December, Stone and her players believed the campaign would last a few weeks. Her players focused on just reaching senior night so they could honor Makrigiorgos, their lone soon-to-be graduate. But the state fended off the virus enough for basketball to continue.

A 17-game season led to Saturday, when Madison held a three-point edge over the Yellow Jackets (15-2) with about five minutes remaining. That’s when Madison guard Alayna Arnolie sunk a three-pointer from the top of the key. On Madison’s next possession, Arnolie’s twin sister, Grace, made a jump shot that put the Warhawks in control the rest of the game.

After the buzzer sounded, Madison’s staff rolled a cart onto the court with a laptop on top so the school could Zoom the trophy presentation to family and fans who couldn’t attend the game. There were hugs and tears, but mostly fist bumps. Players couldn’t gather close in large groups. But they could celebrate with Krispy Kreme glazed donuts, which school staff brought out to the court.

“Winning at our home gym makes it that much more special,” said Alayna Arnolie, who finished with a team-high 20 points. “We held down the house.”