(Reuters) - Diversified healthcare company Abbott Laboratories ABT.N on Friday agreed to buy Alere Inc ALR.N at a lower price than it had previously offered, after raising concerns about the accuracy of various representations, warranties and covenants made by Alere in the earlier agreement.

FILE PHOTO: Traders gather at the booth that trades Abbott Laboratories on the floor of the New York Stock Exchange, December 10, 2012. REUTERS/Brendan McDermid/File Photo

Abbott’s revised offer values Alere’s equity around $5.3 billion, down from the about $5.8 billion announced in February last year, the companies said in a statement, ending a prolonged legal battle over Abbott’s plan to acquire the diagnostic-testing company.

Abbott will now pay $51 per share for Alere, compared with its earlier offer of $56. The new price was a much better outcome than what Alere’s shareholders had priced in, given that Alere’s shares closed at $42.31 on Thursday on the New York Stock Exchange.

While the new deal values Alere at 26.84 times forward earnings, Alere’s peers are on average valued at 37.9 times, according to Thomson Reuters data.

The new $51 per share deal price is in the middle of the initial $49 to $53 per share range that Abbott had indicated it would be willing to pay for Alere when it first discussed an acquisition in December 2015, according to Alere’s proxy statement to its shareholders.

Abbott at the time had not carried out due diligence on Alere, and subsequent negotiations led to a deal being agreed early last year.

However, the deal ran into trouble within months of being announced, as Alere received a grand jury subpoena from the U.S. Department of Justice in March last year seeking documents relating to the company’s sales practices, and delayed filing its annual report.

Both the companies ended up suing each other last year, with Alere forcing Abbott to move ahead with the deal, and Abbott wanting to back out of the deal citing a “substantial loss” in the value of the diagnostics company.

“The renegotiated price is in the realm of investor expectations and seems to reflect the impact from some of the challenges witnessed in Alere’s business over the last 12 months,” Raymond James analyst Nicholas Jansen told Reuters.

Alere has also delayed filing its 2016 annual report and has not yet fixed material weaknesses with respect to its revenue recognition practices disclosed in its 2015 annual report.

“We think the new merger agreement now includes all of the known issues that have developed so would not expect any risk to the future of the deal unless something else emerges as of today’s date,” Jansen said.

Abbott and Alere said on Friday that the companies had agreed to dismiss their respective lawsuits, and the deal is expected to close by the end of the third quarter of 2017.

Waltham, Massachusetts-based Alere, which makes tests for infections such as HIV, tuberculosis, malaria and dengue, while Abbott Park, Illinois-based Abbott sells medical devices, nutritional products and baby formula.

The deal will help Abbott expand in point-of-care diagnostic testing, a market that is growing as physicians increasingly adopt rapid tests that speed up treatment.

Point-of-care tests provide results to doctors in a matter of minutes and can be conducted in the physician’s office, an ambulance or even at home.

The news about the revised deal was first reported by the Financial Times, citing people close to the matter. (on.ft.com/2nLyoDG)

Up to Thursday’s close Alere shares had risen 8.6 percent this year while Abbott had increased 11.1 percent to $42.67.