BP's attempts to quantify and quickly resolve billions of dollars in compensation claims from the Gulf of Mexico oil spill have been undercut by a ruling in a Louisiana court, which questioned the independence of the $20bn claims fund established by the British oil giant last year.

Kenneth Feinberg, the lawyer in charge of the fund, cannot claim to be neutral, a judge said, and is in fact acting in BP's interests.

The ruling throws open the possibility that thousands of people who suffered personal injury or lost their livelihoods as a result of the worst-ever oil spill might now bypass the claims fund and instead seek redress in the courts.

Analysts fear that protracted court action will dramatically increase the costs of the oil spill for BP, not least because of the legal fees involved. It also promises to prolong the uncertainty over the final bill for the spill. An estimated 5 million barrels of oil spewed into the ocean from a ruptured well for almost three months after a fire sank the Deepwater Horizon rig last April, hitting fishing, oyster farming, tourism and other industries along the Gulf coast.

At the height of the public anger over the spill in June, the White House pressured BP into setting up an independent claims fund, under the aegis of Mr Feinberg, the lawyer who previously oversaw claims to victims of the 9/11 terrorist attacks. However, Mr Feinberg's fees are paid directly by BP and he has numerous obligations to consult and provide information to the oil giant throughout the process, Judge Carl Barbier said. Mr Feinberg's firm is paid $850,000 [£526,000] a month for its work.

"A full disclosure of the relationship between Mr Feinberg, the claims fund and BP will at least make transparent that it is BP's interests... that are being promoted," the judge ruled.

Lawyers acting for thousands of claimants have been fighting Mr Feinberg's assertion that people would be better off seeking redress through his fund. They want as many as possible to join a class action against BP in the Louisiana courts.

"Today is a good day for the thousands of victims of the Deepwater Horizon tragedy," said Jim Roy, a lawyer for oil spill victims. "With this ruling, the court is protecting the rights of the thousands of victims of this preventable tragedy, and has unequivocally stated that Mr Feinberg no longer has carte blanche to mislead the public on BP's behalf."

BP's latest estimate of the costs of the spill at $41bn, including compensation for victims and the bill for fixing the well and cleaning up the oil. Earlier this week it reinstated the dividend for shareholders, after having axed it in the wake of the spill. It is trying to recoup many billions of dollars of the costs from its business partners, including other investors in the Deepwater Horizon project and its sub-contractors on the rig.

Mr Feinberg, meanwhile, has so far disbursed $3.5bn in compensation. Speaking before the Louisiana court ruling on Wednesday, he said he expected the Gulf coast to have fully recovered from the disaster within the next two or three years.

Local residents and politicians have rounded on Mr Feinberg, saying it is unfair claimants must waive their right to sue BP if they accept a claims fund settlement, and charging Mr Feinberg with underestimating the scale of the economic damage.

Mr Feinberg said he had "canvassed the universe" to reach a scientific consensus on the speed of recovery from the spill. "If people feel that I have misread the available data or have underestimated the long term data don't take the final payment," he said.

Who is Kenneth Feinberg?

Massachusetts-born Kenneth Feinberg considered a career in acting before studying law in New York in the 1960s. He now boasts an illustrious CV.

After a stint as Senator Ted Kennedy's Chief of Staff in the late 1970s, Mr Feinberg started his own law firm (now called Feinberg Rozen LLP).

Dubbed America's "compensation tsar", he is best known for handling the $180m (£110m) settlement between the manufacturers of Agent Orange and Vietnam veterans, the $7bn federal compensation fund for victims of 9/11 and the memorial fund for the families of victims of the 2007 Virginia Tech massacre.