Attorney General Martha Coakley has finalized an agreement with Partners HealthCare that will allow the state's largest hospital and physicians' network to acquire South Shore Hospital and Hallmark Health Systems.

Coakley said Tuesday that the deal resolves her antitrust investigation into the health care organization. She said it will fundamentally alter the provider's negotiating power for 10 years while controlling health costs across Partner's entire network.

Under the agreement, Partners would be barred from raising costs across its network more than the rate of inflation through 2020.

Partners would also be blocked from additional hospital expansion in eastern Massachusetts, including Worcester County, for the next seven years unless Coakley's office reviews and approves the expansion.

The agreement was filed in Suffolk Superior Court and must be approved by the court.