The share spike added about $1.7 billion to FireEye's market value, which has more than doubled since the company went public in September.

"This deal speaks to our thesis around massive consolidation in the security landscape for 2014, with names such as Fortinet Inc and Proofpoint Inc as prime acquisition candidates ...," FBR Capital Markets analyst Daniel Ives wrote in a note.

Cybersecurity companies are in high demand because of the scarcity of large public corporations in that market and the growing threat of online crime worldwide.

Analysts have said larger players such as IBM, Symantec and Hewlett Packard could look to acquire smaller security players to help drive growth as spending on cybersecurity increases.

Cisco Systems Inc said in July it would buy cybersecurity company Sourcefire Inc for $2.7 billion.

Mandiant is best known for its forensics services. The company rose to prominence in February 2013 when it published a report detailing what it said were links between a Shanghai-based unit of the People's Liberation Army and a long list of attacks on U.S. companies.

Beijing had denied the allegations.

Security experts expect strong growth in both FireEye's cloud-based systems for detecting malicious software and Mandiant's software that analyzes cyber attacks.

The deal will expand the total addressable market of FireEye to $30 billion from $11.6 billion, the company said on Thursday. It also raised its fourth-quarter revenue forecast.

Nomura Equity Research analyst Rick Sherlund said he expects the Mandiant deal to add about $150 million to FireEye's revenue in 2014.

Goldman Sachs raised its price target on FireEye's stock to $45 from $40.

FireEye shares were up 34 percent at $55.33 in afternoon trading on the Nasdaq.

(Reporting by Neha Alawadhi in Bangalore; Editing by Kirti Pandey and Saumyadeb Chakrabarty)

Stocks treated in this article : Juniper Networks, Inc., Fortinet Inc, Proofpoint Inc, FireEye Inc