Former NBA commissioner David Stern underwent emergency surgery Thursday for what the league described as “a sudden brain hemorrhage.”

“Our thoughts and prayers are with David and his family,” the NBA said in a brief statement issued Thursday evening. No other details were immediately available on Stern’s condition.

ESPN reported that Stern, 77, collapsed at a Manhattan restaurant and was rushed to a hospital. According to ABC7 NY, the New York City fire department initially responded to a report of cardiac arrest at approximately 2 p.m.

Stern, described by the NBA as its “commissioner emeritus,” stepped down as commissioner in 2014 after 30 years in charge of the league. He was succeeded by Adam Silver, who had been deputy commissioner since 2006.

Under Stern’s guidance, the NBA grew from a financially troubled league into a lucrative operation with global reach. According to the league, its content is now televised and streamed in 215 countries and territories, in 49 languages.

Stern also oversaw the creation of the WNBA and the NBA’s developmental league, and he was inducted into the Naismith Memorial Basketball Hall of Fame in 2014.

“You just look at where the game is today, and his fingerprints are all over that,” Golden State Warriors star Stephen Curry said of Stern in 2014. “My dad [former NBA player Dell Curry] tells me stories all the time of how the league used to be — it was great, but nothing compared to what it is now.

“When it comes to how much presence we have across the globe, playing conditions, how the league has expanded, he’s had every part in leading the charge.”

Stern has stayed busy in recent years by involving himself with projects aimed at using emerging technologies, such as virtual reality, to transform the way fans consume sports.

“First we watched broadcast, then we had cable, then satellite, then social media,” Stern told The Post last year. “Now technology is going to make us evolve and improve far beyond that."

“Biggest prayers out to David Stern and the Stern Family,” Los Angeles Lakers swingman Danny Green tweeted Thursday. He added, “Sad sad news, but we know he’s a fighter and will make it through!”

This post will be updated

Read more: