Obama administration warns that the most environmentally disastrous spill in US history may continue until August

An uncontrollable fountain of oil could gush into the Gulf of Mexico until August, the Obama administration warned today, as BP conceded it was moving to a containment strategy after failing to plug the well at the centre of the most environmentally disastrous spill in US history.

As anger and despair grew in the coastal communities of Louisiana, BP began preparations to cut a leaking drill pipe on the ocean floor and attach a containment cap intended to capture at least some of the 12,000 to 19,000 barrels of crude spewing from its Macondo well every day.

The oil company, which has come under withering attack for its handling of the crisis, acknowledged there was "no certainty" of success in the effort, which will take four to seven days and which some experts say could make the leak worse.

A White House adviser said the US government was "prepared for the worst" after efforts to halt the leak by pumping mud, golf balls, tyres and other debris into the well were halted without success yesterday.

Carol Browner, the administration's energy czar, said there may be no solution until two relief wells being drilled into the oilfield by BP are complete later in summer. "There could be oil coming up till August when the relief wells are done," she said. "This is probably the biggest environmental disaster we have ever faced in this country."

At the weekend, as the failure of BP's latest attempt became clear, President Barack Obama vented his frustration at the situation.

"It is as enraging as it is heartbreaking, and we will not relent until this leak is contained, until the waters and shores are cleaned up, and until the people unjustly victimised by this manmade disaster are made whole," Obama said in a statement.

Another two months of leakage from the site of BP's sunken Deepwater Horizon oil rig would mean that the spill, which already eclipses the 1989 Exxon Valdez disaster in Alaska, would cause even more damage to marshland wildlife habitats and to the livelihood of shrimpers, fishermen and tourism workers in southern states. Oil already stretches over a distance of 130 miles by 70 miles.

Browner said: "We are prepared for the worst. We have been prepared from the beginning."

As the crisis moved to its fifth week, both BP and Obama faced attacks for failing to come up with a solution. Billy Nungesser, president of Plaquemines parish, Louisiana, called for immediate funding to build a network of sand barriers to protect the coastline.

"It's time for BP to step up to the plate – don't wait for the president," said Nungesser. "Every time that oil takes out a piece of the marsh, a piece of Louisiana is gone forever."

Oil has been leaking from a broken drilling pipe on the ocean floor since the rig caught fire and sank on 20 April, killing 11 offshore workers.

At the weekend, BP abandoned a "top kill" operation to fix the leak after engineers were unable to stem the pressure of oil with thousands of tonnes of drilling mud. "We're disappointed that oil is going to flow for a while and we're going to redouble our efforts to keep it off the beaches," BP's managing director, Bob Dudley, told CNN. "We're moving to a containment operation."

BP's new plan involves using underwater robots and a diamond wire-cutter to create a clean cut through the leaking pipe, then attach a "riser" allowing oil to be pumped to the ocean surface and collected by a ship. Experts say it will be difficult to create a watertight seal on a high-pressure gushing pipe at a depth of 1,500 metres (5,000ft).

Former US secretary of state Colin Powell joined calls for the military to take command of the operation from BP. Powell said the problem was beyond the capacity of BP to solve and the government should bring in "decisive force". He said: "The military brings organisation, it brings control, it brings assets."