BOSTON -- Attorney General Martha Coakley has signed off on a tentative deal that would allow Partners HealthCare to acquire South Shore Hospital, but would significantly limit Partners’ ability to increase costs and expand over the next decade.

At a press conference Monday, Coakley said that after a lengthy review the office negotiated a deal that included caps on cost increases and measures to curb Partners’ clout with insurers because it allowed greater safeguards than suing to stop the proposed merger.

“We believe this agreement will do more to reduce costs, help adjust a dysfunctional marketplace and level the playing field for providers and insurers than any successful lawsuit would have,” Coakley said.

Her decision follows months of anti-trust investigation by the Attorney General's Office and the U.S. Department of Justice.

The parties have agreed to the deal but it needs to be finalized by a court. It will allow Partners to acquire South Shore Hospital and South Shore physicians’ group Harbor Medical Associates, as well as Hallmark HealthCare’s hospitals in Medford and Wakefield.

Under the terms, Partners would not be able to acquire any more hospitals as far west as Worcester County for seven years. Partners and South Shore Hospital would have to limit price increases to the rate of inflation for the next six and a half years and insurers would be able to negotiate rates separately with different parts of Partners’ holdings rather than with the organization as a whole for the next seven to 10 years.

The state’s Health Policy Commission had warned against allowing Partners to acquire the 378-bed Weymouth hospital, saying it would drive up costs and crowd out competition without significantly improving care.

On Monday, commission Chairman Dr. Stuart Altman said in a statement that he was pleased the attorney general had paid attention to the issues raised by the commission and looked forward to reading the final agreement.

The planned merger was on hold while the hospital and Partners awaited word from Coakley's office and the U.S. Department of Justice, on whether they will sue to block the deal.

A spokesman for Coakley’s office said the tentative agreement is not a public document because it hasn’t yet been finalized. It must be finalized by June 16.

Partners announced its intention to merge with the hospital in June 2012.

In July 2013, Partners' Brigham and Women's Hospital began the process to acquire Harbor Medical Associates, which has 65 physicians at several locations on the South Shore.