NEW ORLEANS – Coast Guard crews raced to protect the Gulf of Mexico coastline Monday as a remote sub tried to shut off an underwater oil well that’s gushing 42,000 gallons a day from the site of a wrecked drilling platform.

If crews cannot stop the leak quickly they might need to drill another well to redirect the oil, a laborious process that could take weeks while oil washes up along a broad stretch of shore in four states, from the white sand beaches of Florida’s Panhandle to the swamps of Louisiana.

The oil is escaping from two leaks in a drilling pipe about 5,000 feet below the surface of the ocean. The oil is not expected to reach the shoreline for at least another three days, officials said. The winds and currents can change rapidly and drastically, so officials were hesitant to give more detailed forecasts for where the spill will head.

The oil began gushing out of the sea floor after the rig Deepwater Horizon exploded April 20 and sank two days later about 40 miles off the Mississippi River delta. Eleven of the 126 workers aboard at the time are missing and presumed dead; the rest escaped. The cause of the explosion has not been determined.

As of Monday afternoon, an area 48 miles long and 39 miles wide was covered by oil that leaked from the site of the rig, which was owned by Transocean Ltd. and operated by BP PLC.

Crews used robot submarines to activate valves in hopes of stopping the leaks, but they may not know until today if that strategy will work. BP also mobilized two rigs to drill a relief well if needed. Such a well could help redirect the oil, though it could take weeks to complete, especially at that depth.

Kenneth E. Arnold, an offshore production facility expert, said relief wells pose serious engineering challenges.

“Sometimes you have to drill through the steel, and that’s what happened in Australia,” he said, referring to a blowout last August on a rig called the West Atlas in the Timor Sea. “It took them three times before they were successful.”

It wasn’t until November that mud could be pumped through a relief well to shut off the deepwater spigot. The spill has resulted in major environmental damage along the coast of East Timor and Indonesia.

BP plans to collect leaking oil on the ocean bottom by lowering a large dome to capture the oil and using pipes and hoses to pump it into a vessel on the surface, said Doug Suttles, chief operating officer of BP Exploration and Production. It could take up to a month to get the equipment in place.

“That system has been deployed in shallower water,” he said, “but it has never been deployed at 5,000 feet of water, so we have to be careful.”

The U.S. spill, moving slowly north and spreading east and west, was about 30 miles from the Chandeleur Islands off the Louisiana coast today. The Coast Guard said kinks in the pipe were helping stem the flow of oil.

George Crozier, oceanographer and executive director at the Dauphin Island Sea Lab in Alabama, said he was studying wind and ocean currents driving the oil.

He said Pensacola, Fla., is probably the eastern edge of the threatened area, though no one really knows what the effects will be.

“We’ve never seen anything like this magnitude,” he said. “The problems are going to be on the beaches themselves, that’s where it will be really visible.”

Aaron Viles, director for the New Orleans-based Gulf Restoration Network, an environmental group, said he flew over the spill Sunday and saw what was likely a sperm whale in the oil sheen.

“There are going to be significant marine impacts,” he said.