David Stern, the former NBA commissioner who turned the league into a powerhouse over three decades, died Wednesday at the age of 77, the league announced.

Stern had been hospitalized since undergoing surgery in December after he suffered a brain hemorrhage at a Manhattan restaurant.

The Hall of Famer served as commissioner for 30 years, growing the game exponentially into a multibillion dollar business, before stepping down in 2014 and being replaced by Adam Silver.

“For 22 years, I had a courtside seat to watch David in action,” Silver said. “He was a mentor and one of my dearest friends.

“Because of David, the NBA is a truly global brand — making him not only one of the greatest sports commissioners of all time but also one of the most influential business leaders of his generation,” Silver said.

The NBA was lagging behind the MLB and NFL when Stern took over in 1984, but became a global juggernaut behind his leadership that expertly marketed superstars Michael Jordan, Larry Bird and Magic Johnson among others.

“Without David Stern, the NBA would not be what it is today,” Jordan, now the Charlotte Hornets owner, said in a statement. “He guided the league through turbulent times and grew the league into an international phenomenon, creating opportunities that few could have imagined before.”

Stern also founded the WNBA in 1997 and introduced seven NBA franchises during his tenure, which was not always smooth.

He oversaw two work stoppages, which resulted in the 1998-99 and 2011-12 seasons being shortened to 50 and 66 games, respectively.

In 2005-06, he instituted a dress code policy for players before and after games that former 76ers star Allen Iverson said targeted “guys who dress like me — guys who dress hip-hop.”

Stern was born in New York and raised in Teaneck, N.J. He is survived by his wife, Dianne Bock Stern, and their two sons, Eric and Andrew.