It was a night for celebrating Maryland basketball’s storied past and anticipating its future Friday at Comcast Center.

On the 40th anniversary of Midnight Madness, the tradition founded in College Park, Gary Williams made a surprise return to Comcast Center, took his place on the sideline and watched — rather than screamed or gesticulated — as members of his 2002 NCAA championship team, joined by alumni of various eras and fitness levels, played a crowd-pleasing alumni game of two 10-minute halves.

And it ended with first-year coach Mark Turgeon, named Williams’s successor in May, following this year’s Terrapins squad onto the court amid pyrotechnics and laser beams.

Like Williams, who had bowed out by that point, Turgeon took a seat on the sideline and watched as the 2011-12 Terrapins — eight scholarship players, six walk-ons and one Ukrainian center whose eligibility is in limbo — held a scrimmage for the several thousands who hadn’t departed, the clock nearing midnight.

Freshman Nick Faust flashed some nifty moves. Sophomore guards Pe’Shon Howard and Terrell Stoglin swapped three-pointers. Redshirt freshman Ashton Pankey displayed impressive presence. And Alex Len, the 7-foot-1 center from Ukraine, stuffed the ball into the basket at will.

Not much is expected of the short-handed Terps this season, who lost their leading scorer and rebounder from a team that failed to qualify for the postseason.

“I’ve picked up two preseason magazines; they weren’t very kind to us,” Turgeon said, addressing the crowd before the scrimmage. “So I put ’em right in the recycling. These guys are working hard. And we’re going to try to do great things for you.”

The night’s biggest cheers were reserved for Maryland alums Greivis Vasquez, Steve Blake, Eric Hayes and Chris Wilcox — just a few of the 19 players who took the court for the alumni game. Juan Dixon was scheduled to take part but did not.

Vasquez flew in from his native Venezuela, where he has been playing with the national team during the NBA lockout, so he could take the court again in College Park.

“It’s tough,” Vasquez said of the NBA strife, “so being back with your family is important. I was a little down. But being back here makes you forget about all your problems.”

Williams, who retired in April after 22 years leading the Terps, didn’t address the crowd but spoke briefly to reporters beforehand, explaining that he wanted to come back for the alumni game to see his former players.

With college basketball practice starting in earnest Saturday, Williams confessed that this was a difficult time of year — the time he enjoyed most because it revolved around teaching, which was the reason he had gotten into coaching in the first place.

But Williams also knew that the night belonged to Turgeon and “the next era of Maryland basketball,” as the scoreboard proclaimed.

Turgeon acknowledged Williams in addressing the crowd, which thinned as midnight drew near, and again afterward when speaking to reporters.

“He has been phenomenal. He has introduced me to all the right people. He has eased the transition for me. I know it’s a tough time for him. I’m not looking forward to the day when you can’t coach another team. It will be a tough week for him.”