Private equity firm Veritas Capital and hedge fund Elliott Management are buying Athenahealth Inc for about $5.7 billion, the U.S. healthcare IT company said on Monday.

The all-cash deal values Athenahealth at $135 per share, representing a premium of 12.2 percent to the stock's closing price on Friday. 

Reuters reported on Sunday that Athenahealth had agreed to a takeover. 

(Reporting by Tamara Mathias in Bengaluru) ((Tamara.Mathias@thomsonreuters.com; within U.S. +1 646 223 8780, outside U.S. +91 806749 1208; Reuters Messaging: tamara.mathias.thomsonreuters.com@reuters.net))