Six months after forcing Athenahealth to consider a sale, Elliott Management is teaming up with private equity firm Veritas Capital to buy the company for $5.7 billion.

Elliott subsidiary Evergreen Coast Capital has joined Veritas in the acquisition, according to a joint announcement on Monday morning. The deal is expected to close in the first quarter of 2019 subject to regulatory and shareholder approval.

The private equity firms plan to combine Athenahealth with Virence Health a value-based care solution that Veritas purchased for $1 billion from GE Healthcare earlier this year. The new company will operate under the Athenahealth brand, with Virence CEO Bob Segert leading the company with an executive team made up of leaders from both companies.

Digital Transformation Unlock the Digital Front Door with an App The Member Mobile App is the smarter and better way to engage members anytime and anywhere. Members can find the right doctors, receive alerts, track spending, use telehealth, and more — all within a guided, intuitive, and seamless experience. Built exclusively for payers, it is ready to install and launch in a few months. Request a consult on how to enable the digital front door with the Mobile App, today. Request a Consult

The deal will also take the cloud-based EHR vendor private. Ramzi Musallam, CEO and managing partner of Veritas Capital, said the two companies have "differentiated and complementary solutions."

"After a thorough strategic review process, we have decided to enter this agreement with Veritas, which we believe maximizes value for our shareholders and accelerates our goal to transform healthcare," Jeff Immelt, executive chairman of Athenahealth, said in a statement. "Combining with Virence will create new opportunities for collaboration and growth. Operating as a private company with Veritas's ownership and support will provide athenahealth with increased flexibility to achieve our purpose of unleashing our collective potential to transform healthcare."

The company has been under fire from the Paul Singer-owned activist hedge fund since late last year. Elliott, which owns 9% of Athenahealth, began publicly pressuring the company in May to consider a takeover offer valued at $160 a share or about $7 billion.

RELATED: Elliott Management proposes Athenahealth takeover worth almost $7B

That kicked off a tumultuous several months in which founder and longtime CEO Jonathan Bush was forced to resign and the company began considering outside offers under the direction of chairman and former GE CEO Jeff Immelt. UnitedHealth and Cerner reportedly among those who submitted initial bids. At one point, healthcare payments company nThrive was supposed to swoop in as the company's white knight.

Over that time, Athenahealth's stock has dropped from a peak of $162 per share in June to $120 per share on Friday.

Though Elliott initially indicated it could "substantially improve" its initial offer of $160 per share, the hedge fund had reportedly pulled its offer by September, sending Athenahealth's stocks tumbling. But a new round of bids heated back up in October, and several media outlets reported that Elliott was once again a front-runner.

Elliott Management backed the deal. Its subsidiary, Evergreen, will maintain a minority stake in the new combined company.

"We are pleased to support this transformative transaction combining Athenahealth and Virence, which we believe represents an outstanding, value-maximizing outcome for Athenahealth shareholders," Elliott Partner Jesse Cohn said in the statement.

Veritas has been on a streak of health IT purchases. In addition to Virance, the firm has also acquired Verscend Technologies, combining it with Cotiviti Holdings. Veritas has also invested in Truven Health Analytics.

On Friday, after pushing its third-quarter earnings release back a week, Athenahealth reported quarterly revenue of $329.5 million, up from $301.4 million during the same quarter last year. Net income for the quarter reached $26.4 million, up from $13 million last year.

The EHR vendor is a year into a strategic plan that shaved 9% of its workforce last year, generating as much as $115 million in savings by the end of this year.