NEW YORK — Tibco Software said Monday that it is selling itself to private equity firm Vista Equity Partners for about $3.98 billion.

Tibco, based in Palo Alto, makes software for companies to use on site or through cloud computing. Vista Equity, which owns several software companies, has offices in Austin, Texas, Chicago and San Francisco.

The deal, which is expected to close in the fourth quarter, will take Tibco private.

Vista Equity will pay $24 for each share of Tibco, a 23 percent premium of the company’s closing price of $19.51 on Friday. When debt is included, the two companies value the deal at about $4.3 billion.

Tibco announced earlier this month that its board was considering strategic and financial alternatives for the company. The board decided to sell the company because it was the “best way to maximize value for our shareholders,” said David West, a member of Tibco’s board, in a statement.

Shares of Tibco soared $4.07, or 20.9 percent, to $23.58 in morning trading. Its shares had been down 13 percent so far this year as of Friday.

LH Shoreline, an affiliate of Stockbridge Capital Group, has bought the Google-rented building at 1001 N. Shoreline Blvd. in Mountain View for $169.9 million, according to Santa Clara County property records.