BMC Software says it has agreed to be sold to a private investor group for about $6.6 billion in cash.

BMC Software Inc. makes system management software for businesses

The Houston-based company says that the deal is for $46.25 per share. That's less than 2% above Friday's closing stock price of $45.42.

With roughly 143 million shares outstanding, according to FactSet, that values the deal at $6.6 billion. The companies say the deal is worth $6.9 billion.

The investor group is led Bain Capital and Golden Gate Capital.

BMC says that Elliott Management, which owns 9.6 percent of the BMC's stock, has agreed to vote its shares in favor of the deal.

The deal is expected to close later this year.