(Reuters) — VMware said on Thursday it bought two software companies in separate deals valued at about $5 billion, looking to expand the range of products and services it offers to its corporate clients.

In a deal brokered by Dell, VMware bought Pivotal for $2.7 billion. Dell is a controlling stakeholder in both companies.

Separately, VMware said it would buy software maker Carbon Black for about $2 billion in cash as it seeks to expand the range of security products.

VMWare makes cloud computing software, while Pivotal provides tools for software developers working on cloud services. Carbon Black, on the other hand, has a cloud security platform that uses big data and behavioral analytics to protect against cyberattacks.

VMware will pay $26 per share for Carbon Black at a premium of 6% over its Thursday close.

“By bringing Carbon Black into the VMware family, we are now taking a huge step forward in security and delivering an enterprise-grade platform to administer and protect workloads, applications and networks,” VMware CEO Pat Gelsinger said in a statement.

The company expects Carbon Black and Pivotal to meaningfully add to its revenue in the first year after closing the deals by January next year.

Dell had taken Pivotal public last year for $15 per share. Thursday’s Pivotal deal is for a blended price per share of $11.71, in which Class A stockholders will get $15 per share.

Dell’s stake in Pivotal will be exchanged for VMware share.

The company and its founder Michael Dell owned 131.3 million shares of Pivotal Class B stock, not including the 44.2 million shares held by VMware, according to a regulatory filing.

Pivotal shares rose 9% in extended trading, while those of Carbon Black were up nearly 6%. VMware shares fell 7% and Dell shares shed 3%.