Updated

A U.S. judge on Tuesday approved an agreement for British oil giant BP PLC to plead guilty to manslaughter and other charges and pay a record $4 billion in criminal penalties for the company's role in the 2010 oil disaster in the Gulf of Mexico.

More than 200 million gallons of oil spewed in the three months before BP's blown-out Macondo well could be capped. It was one of the worst environmental disasters in U.S. history.

BP agreed in November to plead guilty to charges involving the deaths of 11 workers in the drilling rig explosion that started the spill and for lying to Congress about the size of the spill. The company could have withdrawn from the agreement if U.S. District Judge Sarah Vance had rejected it.

Neither the Justice Department nor BP presented arguments to the judge before her decision.

Vance said the plea deal was "just punishment" considering the risks of litigation for BP and the alternatives to the settlement. She told victims' relatives who were in court that she read their "truly gut-wrenching" written statements and factored their words into her decision.

"I've heard and I truly understand your feelings and the losses you suffered," she said.

She said she also believes BP executives should have personally apologized to family members.

"I think BP should have done that out of basic humanity," she said.

BP America vice president Luke Keller apologized to the relatives of the workers who died and for the spill's environmental damage to the Gulf Coast.

"BP knows there is nothing we can say to diminish their loss," he said. "The lives lost and those forever changed will stay with us. We are truly sorry."

Billy Anderson, whose 35-year-old son, Jason, of Midfield, Texas, died in the blast, recalled the trauma of watching the disaster play out on television.

"These men suffered a horrendous death," he said. "They were basically cremated alive and not at their choice."

The deal doesn't resolve the federal government's civil claims against BP. The company could pay billions more in penalties for environmental damage.

A series of government investigations have blamed the April 20, 2010, blowout on time-saving, cost-cutting decisions by BP and its partners on the drilling project.

BP separately agreed to a settlement with lawyers for Gulf Coast residents and businesses who claim the spill cost them money. BP estimates the deal with private attorneys will cost the company roughly $7.8 billion.

For the criminal settlement, BP agreed to pay nearly $1.3 billion in fines. The largest previous corporate criminal penalty assessed by the Justice Department was a $1.2 billion fine against drug maker Pfizer in 2009.

The criminal settlement also includes payments of nearly $2.4 billion to the National Fish and Wildlife Foundation and $350 million to the National Academy of Sciences.

In a court filing before the hearing, attorneys for BP and the Justice Department argued that the plea agreement imposes "severe corporate punishment" and will deter BP and other deep-water drilling companies from allowing another disaster to occur.

The Justice Department has reached a separate settlement with rig owner Transocean Ltd. that resolves the government's civil and criminal claims over the Swiss-based company's role in the disaster.

Transocean agreed to plead guilty to a misdemeanor charge of violating the Clean Water Act and pay $1.4 billion in civil and criminal penalties. Another U.S. district judge has scheduled a Feb. 14 hearing to decide whether to accept that criminal settlement. A different judge will decide whether to accept Transocean's civil settlement.

Many relatives of rig workers who died in the blast submitted written statements that were critical of BP's deal. Gordon Jones' family members said BP's sentence should include a personal, face-to-face apology to the 28-year-old's widow and children by BP executives. A brother of Jones also had urged Vance to consider stiffer penalties that prohibit or limit the company's ability to operate in U.S. waters.

Vance, however, said she couldn't get involved in plea negotiations and only could impose a sentence that adheres to the agreed-upon terms if she accepted it.

Four current or former BP employees have been indicted on separate criminal charges. BP rig supervisors Robert Kaluza and Donald Vidrine are charged with manslaughter, accused of repeatedly disregarding abnormal high-pressure readings that should have been glaring indications of trouble just before the blowout.

David Rainey, BP's former vice president of exploration for the Gulf of Mexico, was charged with withholding information from Congress about the amount of oil that was gushing from the well.

Former BP engineer Kurt Mix was charged with deleting text messages about the company's spill response.