BP’s effort to contain the oil spill in the Gulf of Mexico suffered another setback yesterday when a discharge of liquid and gases forced the company to remove the containment cap that for three weeks had been able to capture much of the oil gushing from its damaged well.

Admiral Thad W. Allen of the Coast Guard, at a briefing in Washington, said a remote-controlled submersible operating a mile beneath the surface had most likely bumped a vent and compromised the system. Live video from the sea floor showed oil and gas coursing from the well unrestricted.

By evening, the cap appeared to be back on, nestled in place on the eighth try after about 90 minutes of effort. Live video showed remote-controlled submersibles frequently moving hoses out of the way so that the cap could be lowered over the spewing oil.

John Curry, a BP spokesman, said funneling of oil and gas through a pipe to the drill ship Discoverer Enterprise would begin shortly after the cap was properly positioned and would return to full capacity “as conditions permit.’’

Another system, connected to a drill rig, the Q4000, continued to operate throughout the day, siphoning oil through a separate pipe near the seabed.

This was yet another complication in BP’s two-month struggle to contain the tens of thousands of barrels of oil spewing into the gulf.

On Tuesday, BP said it had been able to capture 16,665 barrels of oil through its containment cap, two-thirds of the total recovery operation.

But at 8:45 a.m. local time yesterday, workers noticed liquids escaping from a valve connected to the Discoverer Enterprise.

A technician with knowledge of the situation said that gas had apparently flowed up the part of the pipe containing warm water used to prevent the formation of icelike hydrates.

Out of concern that more gas might come up, creating the potential for an explosion, the Discoverer Enterprise was moved about 50 feet away, taking the cap with it, said the technician, who spoke on the condition of anonymity because he was not authorized to comment on the work.

Also yesterday, Allen said that two people working with the overall response efforts had died. One was the operator of a vessel assisting the cleanup in Gulf Shores, Ala., who was found dead on his docked boat. The other person died in a swimming pool accident. Neither death appeared to be directly related to specific duties in the effort, Allen said.

Stan Vinson, the coroner in Baldwin County, Ala., said the man found dead on his boat was William A. Kruse, 55, of Foley, Ala. He was a charter boat captain hired by BP.

As oil gushed fiercely from a mile under the surface yesterday, some beleaguered fishermen in the gulf received a reprieve.

The National Oceanic and Atmospheric Association said it opened 8,000 square miles of previously closed fishing area in the gulf because it had not observed oil in the area. One area, south of Mississippi, had been closed only since Monday.

Two-thirds of the federal waters of the Gulf of Mexico are still open for fishing, and the oceanic agency said the closed area now represented 78,597 square miles.

Still, Florida residents directly experienced the effects of the oil: Tar balls and oil mousse with the consistency of sludge washed up on the shore of Pensacola Beach and caused several areas for swimming to be closed, said a spokeswoman for the Incident Command in Mobile, Ala.

In Washington, Interior Secretary Ken Salazar said yesterday that he was preparing new evidence to support a six-month moratorium on deep-water oil and gas drilling in the gulf and was prepared to vigorously challenge a federal judge’s ruling Tuesday that the drilling ban was unjustified.

Appearing before a Senate committee, Salazar said the “pause’’ in the drilling of 33 deep-water wells in the gulf was essential until the causes of the April 20 Deepwater Horizon explosion and oil leak were fully understood.

© Copyright 2010 Globe Newspaper Company.