Comcast Corp reported a better-than-expected 6 percent rise in quarterly revenue, but the cable giant's profit was undercut by fees it paid to bankers and lawyers involved in its acquisition of NBC Universal.

Comcast, which has been working closely with regulators and hopes to close the NBC Universal deal late this year, benefited from more of its customers buying a more expensive package of services, signing up for phone, cable and broadband, for instance. A rebound in advertising also helped.

The result is that revenue climbed to $9.53 billion, surpassing the average estimate of $9.29 billion, according to Thomson Reuters I/B/E/S. Analysts said that overshadowed a slight decline in profit, with fell to $884 million, or 31 cents a share, from $967 million, or 33 cents a share, a year earlier.

Its shares rose 3 percent in premarket trading from Tuesday's close of $19.33.

This focus on more profitable subscriber additions, while it means a lower volume basis, the higher profitability is better for the long term, said David Joyce, an analyst with Miller Tabak. So I think it's positive for the stock.

Indeed, analysts had largely predicted that Comcast would show better overall subscriber growth, and hold on to more of its basic cable customers. Joyce, for instance, had Comcast losing 110,000 basic cable customers for the quarter, when it actually lost 265,000.

Comcast also added fewer high-speed Internet customers during the period than the 175,000 to 195,000 that most expected. Still, the 118,000 that it did add was some 82 percent above year-earlier additions. Comcast added 230,000 digital phone subscribers, similar to the number of additions it posted in the period a year ago and roughly in line with expectations.

The key, Joyce said, is that Comcast is doing well on concentrating on adding the most profitable customers, meaning it can withstand losing those who were subscribing to just basic cable.

If the NBC Universal deal closes, Comcast will not only be delivering customers TV shows and movies, it will also be the company behind their production. Terms call for Comcast to buy a majority stake from General Electric Co , giving it control of the NBC television network, plus a suite of cable channels like USA, a movie studio and other entertainment assets.

Costs associated with the deal totaled about $37 million in the second quarter.

(Reporting by Paul Thomasch; Editing by Lisa Von Ahn and Maureen Bavdek)