(Reuters) - Cyber security firm FireEye Inc FEYE.O on Thursday reported its first-ever quarterly adjusted profit since going public in 2013, highlighting gains from the company's shift to a subscription model and its cost-cutting efforts.

FILE PHOTO: The FireEye logo is seen outside the company's offices in Milpitas, California, U.S. December 29, 2014. REUTERS/Beck Diefenbach/File Photo

FireEye’s shares were up 13.2 percent in extended trading.

The company reported a profit of 1 cent per share for the fourth quarter ended Dec. 31, compared with analysts’ average estimate of a net loss of 1 cent.

Subscription and services business rose 8.5 percent to $164 million in the quarter as the company transitions to a software-as-a-service model (SaaS) from its traditional business that centered around the sale of hardware boxes.

“We delivered year-over-year and sequential growth in every major product group and geographic region, and we closed a record number of transactions greater than $1 million,” Chief Executive Officer Kevin Mandia said in a statement.

The company reported adjusted billings of $242.2 million, topping analysts’ estimate of $221 million, according to research firm FactSet.

Billings include revenue recognized plus the change in deferred revenue - an important indicator of the health and visibility of a company’s business.

Susquehanna analyst Anne Meisner said the deferred revenue mix indicates perhaps some continued contraction in contract lengths as the company’s revenue mix shifts more toward SaaS and other subscription-based products.

The company, which has probed some of the biggest cyber attacks to date including the Equifax breach, has also kept a tight leash on costs.

“At the end of (2016), we really realigned our cost structure. By doing so, we were able to take out $94 million of full-year operating expenses,” Chief Financial Officer Frank Verdecanna told Reuters.

The Milpitas, California-based company said it expected to report between breakeven and earnings of 4 cents per share for the full-year, compared with analysts’ estimate of a net loss of 2 cents.

FireEye also said it expected revenue in the range of $815 million to $825 million, above estimates of $799.3 million, according to Thomson Reuters I/B/E/S.

FireEye said net loss attributable to shareholders widened to $77 million, or 42 cents per share, in the fourth quarter from $61.5 million, or 37 cents per share, a year earlier.

The quarter included payment of $12.5 million in net legal settlement costs, the company said.

Total revenue rose 9.5 percent to $202.3 million, beating analysts’ estimate of $193.6 million.