An Exxon Mobil pipeline that runs under the Yellowstone river in Montana ruptured on Saturday, leaking hundreds of barrels of oil and causing a 25-mile (40km) plume that has fouled the riverbank.

The breach in south-central Montana led to the temporary evacuation of hundreds of residents along a 20-mile stretch of the river, a key tourist attraction in the region that runs through the famous national park of the same name. Cleanup crews deployed booms and absorbent material as the plume moved downstream at around 7mph (10km/h).

The river has no dams on its way to its confluence with the Missouri river just across the Montana border in North Dakota and it was unclear how far the plume might travel.

"The parties responsible will restore the Yellowstone river," Brian Schweitzer, the governor of Montana, said.

An Exxon Mobil spokeswoman, Pam Malek, said the pipe leaked an estimated 750 to 1,000 barrels of oil for about half an hour before it was shut down. Other Exxon officials estimate up to 42,000 gallons (158,982 litres) of crude oil escaped.

Duane Winslow, Yellowstone county director of disaster and emergency services, said the plume was dissipating as it moved downstream.

"We're just kind of waiting for it to move on down while Exxon is trying to figure out how to corral this monster," Winslow said.

"The timing couldn't be worse," said Steve Knecht, chief of operations for Montana disaster and emergency services. "With the Yellowstone running at flood stage and all the debris, it makes it dang tough to get out there to do anything."

He said the plume was measured at 25 miles near Pompeys Pillar national monument

Brent Peters, fire chief for the city of Laurel, said about 140 people in the area were evacuated early on Saturday due to concerns about possible explosions and overpowering fumes. He said they were allowed to return at about 4am after the fumes decreased.

Winslow said hundreds of residents downstream were told to leave in the early hours of the morning as authorities knocked on doors, but it was unclear how many did.

Exxon Mobil said it was sending a team to help with the cleanup, and that state and federal authorities had been alerted to the spill. The Exxon Mobil Pipeline Company "deeply regrets this release", it said.