Cisco Systems (CSCO) said Tuesday it agreed to buy cybersecurity firm Sourcefire (FIRE) for $2.7 billion, as the technology giant expands its security portfolio amid growing demand for cyber defense.

The move is the latest in a string of acquisitions for Cisco, a company that has undertaken an effort to become less reliant on its hardware business. The company’s network equipment business has recorded slower growth recently.

Columbia, Maryland-based Sourcefire, which went public in 2007, offers products such as firewalls, malware protection and intrusion prevention systems.

“Sourcefire aligns well with Cisco’s future vision for security and supports the key pillars of our security strategy,” Hilton Romanski, vice president of corporate development at Cisco, said in a statement. “Through our shared view of the critical role the network must play in cybersecurity and threat defense, we have a unique opportunity to deliver the most comprehensive approach to security in the market.”

Cisco will pay $76 a share in cash, a 29% premium over Monday’s closing price. The purchase price includes retention-based incentives as well.

The deal is expected to close in the second half of this year. Cisco noted that it expects the Sourcefire acquisition to slightly hurt adjusted earnings in fiscal 2014.

About a month ago, Cisco agreed to a $180 million deal for privately held database integrator Composite Software.

Shares of Sourcefire were trading 28.8% higher at $76.10 in pre-market trading. Cisco was down 15 cents at $25.57.

Follow Matthew Rocco on Twitter @MatthewRocco