BP will pay an estimated $7.8 billion to settle a lawsuit over the massive 2010 Gulf of Mexico oil spill with attorneys representing thousands of individual plaintiffs and businesses on the eve of a major trial in a New Orleans federal court, the company said Friday night.

BP said it expects to pay the settlement from the money remaining in a $20 billion escrow account, or trust fund, it set up during the spill to resolve individual and business claims without going to court.

The settlement amount includes $2.3 billion to help resolve economic loss claims related to the gulf seafood industry, the company said. The rest of the money paid out by BP will be determined by two separate sets of formulas and matrices, one for economic claims and one for medical claims. The process will be court supervised. BP also agreed to provide medical consultations for the next 21 years to people with health-related claims and to pay $105 million to improve health care in gulf communities.

Lawyers for the plaintiffs said that BP had agreed to pay all legitimate claims, and that the figure BP gave was an estimate only. “The settlement is to be fully funded by BP, with no cap on the amount BP will pay,” the Plaintiffs Steering Committee said in a statement.

The deal is subject to approval by New Orleans District Court Judge Carl Barbier, who issued a statement Friday night that the trial will be postponed again as other parties reassess their strategies in the case.

The London-based oil giant said the settlement, reached with the Plaintiffs Steering Committee in the multi-district litigation, would “resolve the substantial majority of legitimate economic loss and medical claims” stemming from the accident.

Stephen J. Herman and James P. Roy, the leading plaintiffs’ negotiators, said in a statement that the settlement provides compensation in “a transparent and expeditious manner under rigorous judicial oversight.  It does the greatest amount of good for the greatest number of people.”

Mike Papantino, one of the attorneys representing plaintiffs but not a member of the steering committee, said he was happy with the settlement. “I think everybody should be,” he said Friday night. “No question.”

BP will probably shift its focus to talks with the Justice Department over spill-related civil fines under the Clean Water Act and Oil Pollution Act of 1990, but Justice officials have said the government will not decide whether to file criminal charges for at least a couple of months.

The spill, which poured as much as 4.9 million barrels of oil into the gulf, was triggered by a blowout at BP’s Macondo well on April 20, 2010, killing 11 and sinking the Deepwater Horizon oil rig.

BP has been eager to settle claims quickly, in part to move beyond the incident and in part to avoid a potentially embarrassing trial that would rehash events or uncover potentially damaging information about the blowout’s causes. The company says it has already paid more than $8.1 billion to individuals, businesses and government entities. In addition, it has spent about $14 billion cleaning up the spill.

“From the beginning, BP stepped up to meet our obligations to the communities in the Gulf Coast region, and we’ve worked hard to deliver on that commitment for nearly two years,” BP chief executive Bob Dudley said in a statement. “The proposed settlement represents significant progress toward resolving issues from the Deepwater Horizon accident and contributing further to economic and environmental restoration efforts along the Gulf Coast.”

BP said the proposed settlement would not result in any increase in the $37.2 billion in charges it has already taken against earnings it for costs related to the spill.

The company also said it would dissolve the Gulf Coast Claims Facility that has provided payments for economic losses. Overseen by lawyer Kenneth Feinberg, the facility drew money from the escrow fund to pay $6.1 billion in claims to about 200,000 individuals and businesses.

A trial could still take place over civil charges. The settlement does not cover claims by Gulf Coast state governments or against some other oil service firms, such as Transocean, owner and operator of the Deepwater Horizon, or Halliburton, which provided cement that failed to effectively plug the well. BP said it would transfer to the Plaintiffs Steering Committee the right to pursue claims against Transocean and Halliburton.

“Delays or deals made by other players do not change the facts of this case, and we are fully prepared to argue the merits of our case based on those facts,” said a spokesman for Transocean, which insists BP was responsible for the events leading to the accident.

The trial in New Orleans has been widely anticipated. More than 300 lawyers are involved, and about 72 million pages of depositions and other papers have been filed with the court.

BP has argued that responsibility for the accident should be shared by Transocean and Halliburton, the company that provided cement to seal the well. Earlier, BP reached settlements with its partners in the well, Anadarko Petroleum and a unit of Mitsui.