David Stern, who masterminded the NBA’s growth into a global sports powerhouse while serving as commissioner from 1984 to 2014, died Wednesday after suffering a brain hemorrhage last month. He was 77.

The NBA, whose championship games were not televised live in the United States when Stern’s 30-year tenure began, announced his passing, which came with his family at his bedside.

Stern, who underwent emergency surgery after he was stricken December 12, built the league into a global sporting empire by the time he retired on February 1, 2014, and passed leadership to current commissioner Adam Silver.

“David took over the NBA in 1984 with the league at a crossroads, but over the course of 30 years as commissioner he ushered in the modern global NBA,” Silver said in a statement.

“He launched groundbreaking media and marketing partnerships, digital assets and social responsibility programs that have brought the game to billions of people around the world.

“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.”

Stern boosted corporate backing for the league, such superstars as Michael Jordan and Shaquille O’Neal becoming household names and epic pitchmen.

“RIP Mr David Stern The best commissioner to ever do it,” four-time NBA champion O’Neal tweeted.

Stern oversaw expansion of the league from 23 to 30 clubs, the debut of active NBA talent in the Olympics and the sport’s expansion to a popular worldwide television phenomenon.

“Every member of the NBA family is the beneficiary of David’s vision, generosity and inspiration,” Silver said.

“Our deepest condolences go out to David’s wife, Dianne, their sons, Andrew and Eric, and their extended family, and we share our grief with everyone whose life was touched by him.”

Stern was born in 1942 and worked in his father’s New York delicatessen, growing up a fan of the NBA’s New York Knicks. He became a lawyer in 1966 and began working for the firm that represented the NBA, leaving in 1978 to join the NBA as general counsel and becoming executive vice president of the NBA in 1980.

Key deals with the NBA Players Association were made regarding drug testing and a salary cap, setting the stage for Stern to replace Larry O’Brien as the NBA commissioner in 1984.

“The entire basketball community is heartbroken,” the National Basketball Players Association said in a statement. “David Stern earned and deserved inclusion in our land of giants.

“His impact on our game and our business is immeasurable and the rewards we reap will continue to be appreciated by NBA players and their families for generations.

“As tough an adversary as he was across the table, he never failed to recognize the value of our players, and had the vision and courage to make them the focus of our league’s marketing efforts – building the NBA into the empire it is today. We owe him and we will miss him.”

‘A horrible loss’

Stern oversaw the addition of seven NBA expansion teams – the Charlotte Hornets, Miami Heat, Orlando Magic, Minnesota Timberwolves, Toronto Raptors, Vancouver Grizzlies (who became Memphis) and the New Orleans Pelicans. Six clubs relocated to new home cities during his tenure.

Companies such as Nike and McDonald’s turned to Jordan and other NBA superstars for cross-promotion in selling their products, helping boost the profile of the players and the league all the while.

NFL commissioner Roger Goodell was thankful Stern was there when the boss of the world’s richest sports league needed advice, calling Stern “a driving force in sports for decades (who) helped the NBA soar to new heights around the world.”

Retired 11-time NBA champion Bill Russell called Stern “a great innovator and made the game we love what it is today. He changed so many lives. This is a horrible loss.”

The 1992 US Olympic “Dream Team” of NBA superstars was the top attraction of the Barcelona Games and dazzled opponents in a way unseen before or since, setting the stage for global audiences to become NBA fans.

Silver, who began working for the NBA in 1992, appreciated the detail with which Stern applied himself.

“Like every NBA legend, David had extraordinary talents,” Silver said. “But with him it was always about the fundamentals –- preparation, attention to detail, and hard work.”