Oil company BP has said it has recapped a well in the Gulf of Mexico, allowing it to resume siphoning off the crude after a robotic submarine dislodged the so-called "top hat" cap.
The cap "was successfully reinstalled on the Deepwater Horizon's failed blow-out preventer" at 6:30 pm (23:30 GMT) on Wednesday, BP said in a statement, adding that "the system resumed collecting oil and gas" about 30 minutes later.
About 25,000 barrels of oil are trapped by the cap every day before being pumped to a container ship on the surface, but crude had been pouring from the well unchecked after the incident.
The announcement that the well had been recapped came as the administration of Barack Obama, the US president, appealed a court ruling that blocked a government-imposed moratorium that halted deepwater drilling for six months.
The government asked District Judge Martin Feldman in New Orleans to put his ruling against the moratorium on hold pending the outcome of the appeal or until the appeals court can consider a request for a stay.
Ken Salazar, the interior secretary, said he would revise his original order suspending drilling below 152 metres below sea level to make it more flexible and thus address the court's concerns.
The justice department said in the court filing that the temporary moratorium only affected 33 active deepwater drills in the Gulf of Mexico and the harm from another potential oil spill outweighed other interests.
The "suspensions were issued to prevent the risk of more loss of life and long-term environmental and economic devastation like that arising from the Deepwater Horizon accident," it said.
"In contrast, [the companies] have demonstrated a risk of short-term economic harm."
According to US government estimates, up to four million barrels of oil have spewed into the ocean since April 20, about 15 times as much as was spilled by the Exxon Valdez in Alaska in 1989. BP said it has collected about 325,700 barrels.
The spreading oil slick has shut down rich fishing grounds and affected tourism in four southern states. Hundreds of turtles and seabirds have been killed, along with dozens of dolphins.
Despite moving quickly to call on BP to tackle the spill and help those affected, Obama popularity has been hit by the environmental disaster.
A Wall Street Journal/NBC News poll published on Wednesday found half of those surveyed disapproved of his handling of the situation.
Overall Obama's rating stood at 45 per cent in the poll, down five points from early last month. For the first time in the survey, more people, or 48 per cent, said they disapproved of his job performance.
Impact on investors
The disaster has fuelled investor fears about BP's future and its stock has tumbled since the April 20 spill, losing half its value and trading at levels not seen since 1996.
Thomas DiNapoli, New York comptroller, said the state pension fund planned to sue to recover losses from the drop in BP's stock. Other big US state funds are watching New York's lawsuit but have not yet taken legal action.
"BP misled investors about its safety procedures and its ability to respond to events like the ongoing oil spill and we're going to hold it accountable," DiNapoli, a Democrat who will stand for election in November, said.
BP's share price fall has led some major investors, including Aviva Investors and UBS Asset Management, to start buying again, despite worries about the oil giant's total liabilities related to the spill.
Under the Clean Water Act, which levies a $4,300 per barrel fine, BP could face penalties of more than $15 billion. That does not include the $20 billion compensation fund it agreed to last week or the many billions of dollars in criminal fines that analysts have said could be imposed.