Shares of Palo Alto Networks (NYSE:PANW) are finally making their way out of the doghouse, thanks to a terrific third-quarter report that led to big gains for the stock. The cybersecurity specialist had no problems beating Wall Street expectations, which were already on the low side as the company had issued disappointing guidance earlier this year.

In February, fiscal second quarter results revealed that the company's existing sales model had turned obsolete. As a result, the company had to dial down expectations, while it worked out the kinks in its sales force. Investors are now celebrating as the latest results point to a turnaround.

A hooded figure sits in front of a laptop.

Image source: Getty Images.

Staging a comeback

Palo Alto Networks revenue jumped almost 25% year over year during the fiscal third quarter, beating original expectations of 17% to 20% growth. More importantly, the company's guidance of 20% to 23% year-over-year growth for the current quarter indicates that its performance is back on track. Meanwhile, earnings guidance of $0.79 per share, which topped the consensus estimate of $0.74, points to better cost management.

The impressive turnaround can be attributed to the sales force reorganization that began earlier this year. Restructuring moves helped Palo Alto add 8,500 customers during the quarter, marking the second highest number of quarterly customer additions in its history. More importantly, the biggest customers spent more dollars on its services, as the lifetime value of its top 25% clients jumped 61% year over year.

It appears the company's strategy of focusing on larger accounts could help drive long-term sales growth. And Palo Alto's increasing customer count and value has substantially boosted its deferred revenue. The company is now sitting on $1.6 billion worth of deferred revenue, compared with $1.2 billion at the end of fiscal 2016.

For instance, 60% of the top line has been come from subscription and support services in the first three quarters of the fiscal year. By comparison, subscription and support made up just 51% of revenue in the prior-year period, enabling the company to build sustainable, long-term revenue streams.

Subscription growth will keep driving margin

The improving subscription business is also leading to lower customer-acquisition costs, boosting the operating margin. The company spent 53.8% of its revenue on sales and marketing in the first nine months of the current fiscal year, against 55% in the same period last year.

Not surprisingly, Palo Alto Networks' operating margin has jumped 70 basis points so far this year, and that expansion is likely to continue as the company adds more subscribers thanks to regular product updates. For instance, the company released a new update for its TRAPS endpoint security platform last month, adding modules that can help detect and prevent ransomware attacks.

This new release should help the cybersecurity specialist add more customers following the WannaCry ransomware attack that affected a massive number of computers last month across 150 countries. Cyber-risk modeling firm Cyence believes WannaCry caused $4 billion worth of data losses globally, so it won't be surprising if corporations and governments step up their efforts to better prepare for such incidents in the long run.

Palo Alto has made a smart move by adding protection against ransomware to its services, since it can increase the appeal of its offerings and lead to stronger revenue growth. More importantly, the company has successfully overcome the short-term headwinds it was facing by substantially boosting its customer count last quarter, and it should be able to sustain the momentum, as the full benefits of its sales reorganization initiative have yet to be realized.

Harsh Chauhan has no position in any stocks mentioned. The Motley Fool recommends Palo Alto Networks. The Motley Fool has a disclosure policy.