A BP cleanup crew shovels oil from a beach in this May 2010, file photo, at Port Fourchon, Louisiana. US District Judge Carl Barbier ruled on September 4, 2014, that BP’s “gross negligence” and “willful misconduct” had caused the massive oil spill in the Gulf of Mexico in 2010. (Stephane Jourdain/AFP/Getty Images)

A federal judge in New Orleans on Thursday ruled that BP’s “gross negligence” and “willful misconduct” had caused the massive oil spill in the Gulf of Mexico in 2010 and that the company’s “reckless” behavior made it subject to fines of as much as $4,300 a barrel under the Clean Water Act.

The ruling by District Court Judge Carl Barbier means that the government can impose penalties nearly four times as large as it could if BP were not found guilty of gross negligence.

The ruling could open up the company to fines as much as $17 billion. BP has set aside $3.5 billion for potential Clean Water Act fines and has noted that in previous oil spill cases, the government and the courts have imposed penalties far lower than the maximum. Nonetheless, the price of BP shares tumbled nearly 6 percent on the news.

BP issued a statement Thursday saying that it “strongly disagrees with the decision issued today.”

“The law is clear that proving gross negligence is a very high bar that was not met in this case,” the company said. “BP believes that an impartial view of the record does not support the erroneous conclusion reached by the District Court.”

Barbier said that drilling rig owner and operator Transocean and oil services giant Halliburton were also “negligent” in the events that led to the blowout of BP’s Macondo well that set fire to Transocean’s Deepwater Horizon rig, killed 11 workers and triggered the largest oil spill in U.S. history. Barbier apportioned 67 percent of the fault to BP, 30 percent to Transocean and 3 percent to Halliburton.

Transocean last year agreed to pay the government $1 billion to settle its Clean Water Act liabilities related to the oil spill, and it paid an additional $400 million in criminal penalties. But Barbier had harsh words for the company, saying that it “was aware that its crews lacked training about the proper use of diverters” that should have directed dangerous hydrocarbons away from the rig. He also said that Transocean had not lined up the diverter properly.

Halliburton has vigorously denied that its cement job designed to seal the well shut was a reason for the blowout and the government has not sought to impose Clean Water Act fines on the company. But Barbier said that “the cementing program at Macondo clearly did not prevent the direct or indirect release of fluids from a stratum, through the wellbore, and into offshore waters, and this failure was, in fact, a proximate cause of the incident.”

The question of negligence is the first part of a three-part court case about the fines the government can impose on the London-based oil giant. This part assigns blame. The second part will determine the size of the spill. (BP’s estimates are sharply lower than the government’s.) And the third part will determine the final amount of the Clean Water Act and punitive fines.

BP has spent about $27 billion so far to clean up the oil spill and compensate people and businesses harmed by the spill. The company has taken $43 billion of charges against earnings so far, it said in its most recent earnings release.

At the same time, the company has increased its drilling activity in the Gulf of Mexico. At the end of 2013, the company was operating 10 deepwater rigs there. It has brought several new wells online.

All three parts of the ongoing court case are separate from BP’s settlement with private plaintiffs claiming economic damages. That settlement, which BP expects will cost about $9.2 billion, is also before Barbier.

The lead lawyers in that case, James P. Roy and Stephen J. Herman, issued a statement Thursday saying that “the Court has now laid bare the full extent of the level of BP’s misconduct.”