Phil Weinberg, the attorney for Comcast Spectacor, the Wells Fargo Center, the Flyers, Wings, Fusion, and the East Coast Hockey League’s Maine Mariners, died suddenly on Wednesday. He was 66.

According to the Flyers, Mr. Weinberg died unexpectedly while recovering from surgery. He is survived by his wife, Terry, and their children, Sydney and Zach.

Mr. Weinberg, the executive vice president and chief legal counsel for Comcast Spectacor, was a behind-the scenes worker who was vital to the Flyers and other related teams and businesses. He served as the Flyers’ alternate governor.

“Though he was rarely in the public eye, Phil Weinberg spent three decades expertly performing the critical work that made the Flyers, the National Hockey League, and Comcast Spectacor stronger,” Gary Bettman, the NHL commissioner, said in a statement. “More importantly, Phil’s contributions heightened both the in-arena and at-home experiences for Philadelphia sports fans, and his tireless philanthropic efforts touched and improved countless lives in his community.”

Since becoming executive vice president and general counsel in 1996, Mr. Weinberg was in the middle of several company-defining transactions, including the construction and financing of the Wells Fargo Center, the merger between Comcast and Spectacor, and the acquisitions of Global Spectrum, Ovations Food Services, New Era Tickets, and Paciolan, along with the sale of the 76ers.

When Comcast completed its acquisition of NBC Universal, Mr. Weinberg worked with Comcast’s Regional Sports Network group as its executive vice president of legal and business affairs.

Wednesday was the 31st anniversary of Mr. Weinberg’s first day with the Flyers.

“For more than three decades, Phil poured his heart and soul into this organization and all it stands for in the city of Philadelphia,” said Dave Scott, chairman and CEO of Comcast Spectacor and Governor of the Flyers. “Phil loved the Flyers, he loved our fans, he loved this city, and he loved this organization. He was an invaluable adviser to both Ed Snider and me, He was a beloved mentor and colleague to hundreds of employees over the years, and he cherished the history and tradition of this organization.”

Scott said Weinberg’s passing was “heartbreaking for me personally and for everyone here because he exemplified the unique culture that the Flyers have built over the years, based on loyalty, determination, and family. He was, and will remain, an institution within the Flyers organization, but above all, we will remember him as a kind and brilliant friend and devoted husband and father.”

“From the moment we joined forces with Ed Snider to create Comcast Spectator, Phil was right there as a wonderful and trusted adviser who helped guide us and build the partnership that lives on today,” Brian L. Roberts, chairman and CEO of Comcast Corp., said in a statement.

Mr. Weinberg joined Comcast Spectacor in 1990 after seven years working with the litigation firm of Sprague & Sprague in Philadelphia.

He was on the Board of Directors of the Ed Snider Youth Hockey Foundation, Flyers Charities, Philadelphia Futures, and Big Brothers/Big Sisters of Southeastern Pennsylvania. He was also the personal attorney for the late Snider, the Flyers’ co-founder.

Lou Nolan, the Flyers’ longtime public-address announcer, said Mr. Weinberg “was very sharp and had a lot of class. Just a wonderful guy to be around.”

Bettman said he would miss Mr. Weinberg “terribly,” and called him “an extraordinary lawyer who served Ed Snider and the Flyers superbly since 1990, Phil was a terrific colleague with sound vision who was respected and well-liked throughout our league.”

Funeral arrangements were pending.