A months-long bidding war over Quest Software Inc. — a maker of data-protection and database-management software — appears to have reached its conclusion, with Dell Inc. announcing Monday that it has reached an agreement to buy Quest for $28 per share in cash in a transaction that values the Aliso Viejo-based company at roughly $2.4 billion.

In accepting Dell’s offer, Quest spurned a proposed $2 billion deal that would have seen venture capital firm Insight Venture Partners take the publicly traded company private. Quest has continued to solicit offers since the tentative deal with Insight was announced in March, and ultimately decided to take its business to Dell, which is looking to expand its recently created software group. (While the purchase price represents only a marginal premium over Quest’s $27.81 closing price Friday, the value of the company’s stock has jumped 43 percent since the day before the potential deal with Insight was announced.)

If approved by shareholders and regulators, the acquisition of Quest by Dell will generate a windfall for Quest CEO and chairman Vincent Smith, who was a driving force in the proposal to take his company private. Under the terms of the sale, Smith’s roughly 35 percent stake in Quest is worth about $840 million.

For Latham & Watkins M&A and capital markets partner Charles Ruck, who has led the firm’s team representing Quest throughout the negotiations, watching Smith go from wanting to help buy the company to deciding to sell it made for about “as interesting and, in some ways, challenging a transaction as you can get.” Ruck says he first began doing work for Quest five years ago, when the company turned to him for advice on stock option backdating issues that many corporate boards were addressing at the time.

Rounding out the Orange County-based Latham deal team are corporate partners Scott Shean and Michael Treska, with the assistance of New York benefits and compensation partner Bradd Williamson; Washington, D.C.-based competition partner Michael Egge; Los Angeles tax partner Pardis Zomorodi; Silicon Valley intellectual property partner Anthony Klein; and Los Angeles finance partner Glen Collyer.

Quest general counsel David Cramer and in-house lawyer James Sytsma were also actively involved in guiding the deal to completion, Ruck says.

For its part, Dell turned to Skadden, Arps, Slate, Meagher & Flom M&A partners Allison Schneirov in New York and Kenton King in Palo Alto to advise on the deal (King, who was not immediately available to comment Monday, referred questions to Schneirov, who did not return a request for comment). The in-house Dell team working on the acquisition includes general counsel Lawrence Tu and lawyers Janet Wright, Mark Mouritsen, Kim Erlanson and Robert Potts.

The drawn-out negotiations produced assignments for several other law firms, with Willkie Farr & Gallagher advising Insight; Cadwalader, Wickersham & Taft representing CEO Smith; and Delaware’s Potter Anderson & Carroon acting as outside counsel to a special committee of Quest’s board of directors.

As a penalty for terminating its agreement with Insight, Quest must pay the venture capital firm $37 million (a portion of which Dell has agreed to loan the company) — a $25 million break-up fee plus $12 million in expenses Insight incurred in connection with the negotiations. The break-up fee is substantially higher than the $3.5 million penalty that was part of the Insight deal when it was announced in March, according to Recorder affiliate The Am Law Daily‘s previous coverage.

Round Rock, Texas-based Dell has been diversifying its offerings in recent years in an effort to decrease its reliance on hardware. In February, the company created a separate software unit and since then has acquired backup software technology company AppAssure; network security and data protection maker SonicWALL; and cloud-computing company Wyse Technology, all for undisclosed amounts. Lawyers from Dewey & LeBoeuf, including former partners Rick Climan and Jane Ross, both of whom are now at Weil, Gotshal & Manges, represented Dell in the Wyse and SonicWALL acquisitions.

Sara Randazzo is a reporter with The Am Law Daily, a Recorder affiliate.