BP is free to resume deepwater drilling in the Gulf of Mexico after a Louisiana judge overturned Barack Obama's ban imposed in the wake of the worst environmental disaster in US history.

The company operates at least one of the 33 rigs which have been idle since the moratorium last month, according to industry data.

BP declined to confirm the location of its rigs or whether it intended to resume deepwater drilling in the Gulf.

The ruling could also lead to further legal challenges by the oil industry against the White House's handling of the crisis. The government has imposed a nationwide ban on issuing offshore drilling permits which could also come under attack in the courts.

Yesterday, Louisiana-based judge Martin Feldman ruled that the federal government's six-month blanket moratorium in the Gulf was unjustified because it assumed that all deepwater drilling was as dangerous as BP's.

"An invalid agency decision to suspend drilling of wells in depths of over 500 feet simply cannot justify the immeasurable effect on the plaintiffs, the local economy, the Gulf region, and the critical present-day aspect of the availability of domestic energy in this country," Feldman said in his ruling, according to the Associated Press news agency.

The ruling represents a victory for the oil industry and for state politicians. Both groups had argued the ban would result in tens of thousands of job losses across Louisiana if it stayed in place. Lawyers representing the oil services companies, who brought the lawsuit against the US federal government in New Orleans, warned a whole "ecosystem of businesses" was at risk.

The White House said last night it would seek an immediate injunction against the ruling. "Continuing drilling at these depths without knowing what happened does not make sense," said spokesman Robert Gibbs.

But Camilo K Salas III, a New Orleans-based attorney, said Obama may privately welcome the decision. "Now they can say: 'We did what we had to do but the judge overruled us.' That way they look good for trying to stop the drilling but the economy is not damaged."

Obama has faced intense domestic criticism for not taking control of the crisis earlier and putting too much trust in BP's ineffective attempts to tackle the spill.

BP has made recently huge discoveries of oil and gas in the deep waters of the Gulf of Mexico which require further drilling and development.

In September last year, it announced that the Tiber well, drilled to a depth of more than 3,050 metres (10,000 feet) in the Gulf, making it the world's deepest exploration well to date, could hold as much as 3bn barrels of oil and gas. It dwarfs the Macondo prospect, where the Deepwater Horizon rig was drilling, at 1,500 metres and containing about 50m barrels.

Oil companies are likely to wait until the outcome of any appeal is known before resuming deepwater drilling.

Asked about whether BP would resume deepwater drilling in the Gulf, a spokesman said: "We have no comment on this case or decision, as we are not a party to the case.

"Most of the fleet of rigs we have under contract are responding to the spill. We don't discuss publicly our drilling plans and the disposition of those assets."

According to the Louisiana Mid-Continent Oil and Gas Association, last month BP had in place one operational rig affected by the moratorium.

Officials from the much maligned and now defunct regulator, the MMS, were reported as saying that BP had two in the Gulf. Shell had the most, at seven, according to the association, while Texas-based Anadarko Petroleum, BP's partner on the stricken Macondo well, operated three of the 33 affected.

Environmental groups vowed to appeal against yesterday's ruling. The Sierra Club, one of the groups which gave testimony in Monday's hearings, said in a statement: "We haven't even stopped the massive flow of oil yet, let alone begun to respond to the damage it has wrought. It's like there's been a car accident and we're talking about how to get the vehicle on the road again while the victim is still bleeding."

Interior secretary Ken Salazar imposed the ban on 27 May, more than a month after the accident took place.

He said that the ban was necessary to allow new safety procedures to be implemented and a thorough investigation of what caused the accident to be carried out. But Salazar was forced to apologise after officials said that the seven independent experts brought in to peer review their report into safety practices in the Gulf endorsed the moratorium.

The scientists and engineers argue that shutting down drilling – an operation which led to the explosion on BP's Deepwater Horizon rig – is actually more dangerous than allowing it to continue.