Comcast Corp , the No. 1 U.S. cable operator, reported higher quarterly profit on Thursday due to improved cost controls and a tax gain, but lost basic video subscribers as it was hurt by the weak economy and competition from phone and satellite operators.

Second-quarter net profit rose to $967 million, or 33 cents a share, from $632 million, or 21 cents a share, a year earlier.

Analysts had been expecting 36 cents a share, according to Reuters Estimates.

Comcast's profitability was aided by slowing growth as it spent less on new installations and equipment while selling more high-end services like HD digital video recorders to its existing customer base.

Revenue rose 4.5 percent to $8.938 billion.

The Philadelphia-based company lost more than 214,000 basic video subscribers during the quarter, despite the fact that customer losses would have been softened by the extension of the U.S. government-mandated digital TV transition to June 12. Analysts from Collins Stewart had expected Comcast to lose 165,000 subscribers.

Stiffer competition and the weak economy meant Comcast experienced a 65 percent drop in the number of new services it sold during the period.

Comcast added 65,000 high-speed Internet customers during the period, less than a quarter of the number it added a year ago. It added 233,000 digital phone subscribers, less than half the number it added a year ago. It added 250,000 digital video subscribers, compared with 320,000 a year ago.

The company said it had restarted its share buyback program, which it suspended in the third quarter of 2008.

(Reporting by Yinka Adegoke; editing by John Wallace)