BOSTON � Massachusetts health care officials said Friday they'll pay the lead contractor on the state's hobbled health insurance website an additional $35 million to close out the contract.

That means the CGI Group, which has already been paid about $17 million, will end up receiving $52 million of an $89 million contract.

Health care officials said the $35 million will compensate CGI Group and subcontractors for meeting certain milestones since November, when they were last paid.

Officials said the agreement signed with CGI on Friday also allows the Massachusetts attorney general to recover up to $12 million, based on an ongoing false claims investigation.

Gov. Deval Patrick called the deal ''a pragmatic way to wind up a frustrating relationship.''

Payments for the most critical portions of the services will only be made if officials are satisfied with what CGI delivers, said Maydad Cohen, special assistant to the governor.

Massachusetts announced in March that it was dropping CGI after the state's updated health care website ran into serious troubles.

Cohen said since then the top priority has been negotiating ''a careful, thoughtful transition so as to not jeopardize the project's future and set us further behind.''

Health care officials said CGI will continue to provide ''critical transition services'' over the next several months.

Cohen said the original $17 million was for work delivered by CGI that met expectations. The $89 million contract includes an original base estimate of $69 million and $20 million in change orders.

CGI was also the lead contractor for the federal health care website that ran into early difficulties.

Cohen said of the $35 million payment, $20 million will cover additional work that will continue to provide value to the state. He said most of those payments will go to CGI subcontractors.

He said the remaining $15 million will cover the cost of ongoing operations and maintenance.

Cohen said the state is incorporating the lessons it learned with CGI into the contract it's negotiating with Optum, the new systems integrator.

He said that contract will put the vendor at risk if milestones aren't met. He said the state will make ''every effort to ensure that it owns intellectual property developed during the project's lifespan.''

Massachusetts officials unveiled a strategy last month for overhauling the health insurance website that has dramatically slowed the state's transition from its first-in-the-nation expanded health care law to the requirements of the federal Affordable Care Act.

The new approach calls for purchasing software powering health marketplaces in other states while laying the groundwork for a temporary switchover to the federal government's marketplace, should that become necessary.

Fewer than 32,000 Massachusetts residents were able to enroll in coverage that meets the federal law's requirements � far short of the goal of 250,000, an Obama administration report released this year found.

The new strategy calls for a functional Massachusetts health insurance marketplace by the start of the next open enrollment period Nov. 15, and a fully integrated system by next year.