Updated

A cement plug has permanently killed BP's runaway well nearly 2.5 miles (4 kilometers) below the sea floor in the Gulf of Mexico, five agonizing months after an explosion sank a drilling rig and led to the worst offshore oil spill in U.S. history.

Retired Coast Guard Adm. Thad Allen, the federal government's point man on the disaster, said Sunday that BP's well "is effectively dead" and posed no further threat to the Gulf. Allen said a pressure test to ensure the cement plug would hold was completed at 5:54 a.m. CDT (10:54 GMT).

President Obama commended Allen and other federal officials Sunday for achieving an "important milestone," and said the U.S. remains committed to restoring the environment in the Gulf.

"While we have seen a diminished need for our massive response that encompassed more than 40,000 people, 7,000 vessels and the coordination of dozens of federal, state and local agencies and other partners, we also remain committed to doing everything possible to make sure the Gulf Coast recovers fully from this disaster," Obama said in a statement. "This road will not be easy, but we will continue to work closely with the people of the Gulf to rebuild their livelihoods and restore the environment that supports them."

The gusher was contained in mid-July after a temporary cap was successfully fitted atop the well. Mud and cement were later pushed down through the top of the well, allowing the cap to be removed.

But the well could not be declared dead until a relief well was drilled so that the ruptured well could be sealed from the bottom, ensuring it never causes a problem again. The relief well intersected the blown-out well Thursday, and crews started pumping in the cement on Friday.

The April 20 blast killed 11 workers, and 206 million gallons (780 million liters) of oil spewed.

The disaster caused an environmental and economic nightmare for people who live, work and play along hundreds of miles of Gulf shoreline from Florida to Texas. It also spurred civil and criminal investigations, cost gaffe-prone BP chief Tony Hayward his job, and brought increased governmental scrutiny of the oil and gas industry, including a costly moratorium on deep water offshore drilling that is still in place.

Gulf residents will be feeling the pain for years to come. There is still plenty of oil in the water, and some continues to wash up on shore. Many people are still struggling to make ends meet with some waters still closed to fishing. Shrimpers who are allowed to fish are finding it difficult to sell their catch because of the perception -- largely from people outside the region -- that the seafood is not safe to eat. Tourism along the Gulf has taken a hit.

The disaster also has taken a toll on the once mighty oil giant BP PLC. The British company's stock price took a nosedive after the explosion, though it has recovered somewhat. Its image as a steward of the environment was stained and its stated commitment to safety was challenged. Owners of BP-branded gas stations in the U.S. were hit with lost sales, as customers protested at the pump.

And on the financial side: BP has already shelled out more than $8 billion in cleanup costs and promised to set aside another $20 billion for a victims compensation fund. The company could face tens of billions of dollars more in government fines and legal costs from hundreds of pending lawsuits.

BP took some of the blame for the Gulf oil disaster in an internal report issued this month, acknowledging among other things that its workers misinterpreted a key pressure test of the well. But in a possible preview of its legal strategy, it also pointed the finger at its partners on the doomed rig.

BP was a majority owner of the well that blew out, and it was leasing the rig that exploded from owner Transocean Ltd.

The Associated Press contributed to this report