By Malathi Nayak and Aishwarya Venugopal

(Reuters) - U.S. satellite TV provider Dish Network Corp <DISH.O> reported better-than-expected earnings on Thursday but posted its biggest-ever decline in pay-TV subscribers amid fierce competition from online video services.

Dish said it lost 281,000 net pay-TV subscribers in the second quarter ended June 30, significantly more than the average analyst estimate of a loss of 91,000 subscribers, according to market research firm FactSet StreetEstimate.

To offset losses in its core satellite-TV business as viewers gravitate toward online video services such as Netflix, the company last year launched a cheaper Sling TV online streaming service that offers a slim bundle of channels, including live content from ESPN.

When Dish reports pay-TV subscriber numbers, it includes satellite TV and Sling TV customers. Dish does not separately report Sling TV numbers but analysts say it has more than 700,000 subscribers.

The company is estimated to have lost 330,000 television subscribers and to have added 49,000 Sling TV subscribers, according to MoffettNathanson analyst Craig Moffett.

If his estimates are correct, Moffett said, "then it looks like Dish is already hitting a wall at Sling TV, which is alarming just a year after launching the service."

Shares of Dish were relatively unchanged at $52.81 on Thursday afternoon.

In the latest quarter, net income attributable to Dish rose about 27 percent from a year earlier to $410 million, or 88 cents per share. Analysts, on average, expected earnings of 72 cents per share, according to Thomson Reuters I/B/E/S.

Net revenue rose to $3.84 billion from $3.83 billion. Dish raised its video service rates in January.

Dish is also facing competition from AT&T Inc <T.N> that bought satellite-TV provider DIRECTV last year and has begun cross-selling TV services to its wireless customers, Chief Executive Charlie Ergen said on an earnings call.

The company is locked in a battle with the National Football League and Tribune Media Co <TRCO.N> over fees to carry some of their content. In the past, such programming disputes spurred service interruptions and hurt pay-TV subscriber activations, Dish said in a filing.

As Dish's core business struggles, investors wonder what Ergen will do with wireless airwaves or spectrum that it has spent billions of dollars stockpiling over the years. Dish has spectrum that could be worth more than $45 billion, analysts say.

Last week, Dish put down a down payment to participate in the U.S Federal Communications Commission's ongoing auction that involves a sale of airwaves from television braodcasters for wireless use.

(Reporting by Malathi Nayak in New York and Aishwarya Venugopal in Bengaluru; Editing by Will Dunham and Bernard Orr)