U.S. network equipment maker Ciena Corp reported a quarterly loss on Thursday on weaker technology spending by phone companies, but the results were better than expected and its shares rose 5.7 percent.

The company said the numbers reflected a challenging, but improving, business environment, as well as its own efforts to cut operating costs.

But it shied away from forecasting a recovery and said customers were likely to remain wary about equipment spending, following the example of other network equipment makers like Cisco Systems and Tellabs Inc which announced firm results but refrained from calling a recovery.

Whilst sentiment is better and we certainly see a long-term positive trajectory, it's still difficult to predict. I think we're still at the nascent stage of a recovery, Chief Executive Gary Smith told Reuters.

Revenue for the fiscal third quarter fell 35 percent to $164.8 million, but was higher than the average analyst estimate of $152.6 million.

The company posted a net loss of $26.5 million, or 29 cents a share for its fiscal third quarter, compared with a profit of $11.7 million, or 12 cents a share, one year earlier.

The loss excluding special items was 5 cents compared to the average analyst estimate of loss of 13 cents, according to Reuters Estimates.

S&P Equity Research upgraded its recommendation on Ciena stock to a hold from sell, and the shares rose 60 cents to $12.87.

Ciena's Smith said that while revenue had risen sequentially in the third quarter and industry sentiment had improved, he expects revenue in the current quarter to be around the same as the previous quarter.

Customers in general continue to spend cautiously, he said.

Ciena sells optical switches and other products that direct Internet traffic. Its customers include large tier 1 phone companies such as AT&T Inc, Sprint Nextel Corp and Verizon Communications and some smaller carriers.

Phone companies earlier this year vowed to rein in spending to cope with a weakening economy, but many have recently announced investments in advanced technologies to position themselves for a recovery and to cope with growing Internet traffic.

The major carriers, as we began to go into this, looked to constrain their spending across the board. What they're now doing is looking to invest in some of the more strategic areas again, Smith said.

We continue to believe that current levels of spending are unsustainable over time, particularly given the combination of traffic growth and new service demands on networks.

Ciena shares were up 70 cents to $12.97 in Thursday's Nasdaq trading.

(Reporting by Ritsuko Ando; Editing by Derek Caney)