BP and the lawyers for plaintiffs in the trial over the 2010 oil spill in the Gulf of Mexico have agreed to settle their case. Judge Carl J. Barbier of Federal District Court in New Orleans issued an order late Friday night stating that the two sides “have reached an agreement on the terms of a proposed class settlement which will be submitted to the court,” and announcing that the first phase of the trial, scheduled to begin on Monday, is adjourned indefinitely while the next steps are worked out. BP issued a statement from the company’s chief executive, Robert Dudley, saying, “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.” The company estimated that paying the claims would cost $7.8 billion — but it did not state that the estimate represented an upper limit on what it would pay. It said it had already paid out more than $8 billion to claimants, and had spent some $14 million in responding to the spill. The two lawyers who led the plaintiffs’ steering committee, Stephen J. Herman and James P. Roy, said, “This settlement will provide a full measure of compensation to hundreds of thousands — in a transparent and expeditious manner under rigorous judicial oversight.” The plaintiffs’ group that reached the agreement with the company represents businesses and individuals affected by the spill. The agreement does not include the biggest plaintiff in the BP case: the federal government. Nor does it include the state and local governments along the coast, which are also suing. The federal government stands to recover billions of dollars in environmental fines, but the extent to which the Justice Department is involved in negotiations with BP is unclear. The explosion aboard the Deepwater Horizon rig in April 2010 killed 11 rig workers and began a spill that for months spewed millions of barrels of oil into the Gulf of Mexico, fouling beaches, killing wildlife and disrupting the economies of Gulf Coast States. Investigations in the ensuing months found a series of errors by BP, the owner of the well, as well as by Transocean, the owner of the rig, and by Halliburton, which performed the cement job. The first phase of the trial was intended, in part, to apportion blame among the defendants. The agreement calls for replacing the $20 billion fund created by BP to compensate victims of the spill, and to pay natural resources damages and state and local response costs. The fund, called the Gulf Coast Claims Facility and run by Kenneth R. Feinberg, a lawyer, would become a new fund administered by the court. Mr. Feinberg has paid more than $6 billion from the fund to some 200,000 individuals and businesses. The company announced that payments to people making claims under the Feinberg fund would continue to be paid during the transition. “Ken Feinberg has overseen the GCCF since it began operating in August 2010, and we thank him and his team for their dedication and professionalism,” Mr. Dudley said in the news release. Along with the settlement for economic damages, BP and the plaintiffs’ committee reached an agreement on medical issues related to the spill, and will provide compensation and medical services for 21 years. Though all sides have said they are ready to go to trial, the incentives to settle have been enormous. David M. Uhlmann, who headed the Justice Department’s environmental crimes section from 2000 to 2007, said, “The plaintiffs’ steering committee really needs to reach a settlement with BP” because otherwise it could face years of litigation and might obtain less at trial than it could receive in a settlement. At the same time, said Mr. Uhlmann, now a professor at the University of Michigan law school, said, “BP really needs to reach a settlement with the government” which could extract many more billions from the company in civil and criminal proceedings. Moreover, he said, the company would like to avoid the embarrassment of having its mistakes paraded in open court. Some people outside of the litigation, particularly representatives of environmental groups, say that whether the case ends at a negotiating table or in a courtroom, they want to see a large amount of the environmental fines go to restoring the Gulf Coast. “Our goal is money to the gulf, as quickly as possible,” said Courtney Taylor, policy director of the Mississippi River Delta program at the Environmental Defense Fund. The groups support a bill introduced by Senator Mary L. Landrieu, Democrat of Louisiana, and Richard C. Shelby, Republican of Alabama, that would dedicate 80 percent of the fines collected under the Clean Water Act in the case to gulf restoration. “The country should not use this as an excuse to profit off of the heartbreak and suffering and bankruptcies that resulted from the spill and the follow-up actions,” Ms. Landrieu said.