Media playback is unsupported on your device Media caption Native Americans have long protested against the plans

The US government has stepped into a dispute over an oil pipeline in North Dakota, blocking its construction on federal tribal lands.

It also asked the company behind it to "pause" action on a wider stretch held sacred by a Native American tribe.

The government order came shortly after a district judge denied a request to halt construction on the pipeline.

The Dakota Access Pipeline is opposed by over 200 Native American groups who fear its impact on waterways.

The $3.7bn (£2.8bn) project will pass through four states, close to lands that are sacred to members of the Standing Rock Sioux Tribe.

But only minutes earlier, US District Judge James Boasberg ruled that a decision to fast-track the pipeline project was not illegal.

The federal government then in effect overruled the judge, calling on the Texas-based company to voluntarily halt construction temporarily within 20 miles of Lake Oahe, which is considered sacred to the regional native tribes.

Image copyright AP Image caption In North Dakota's state capital Bismarck, hundreds of protestors celebrated the government's move

"This case has highlighted the need for a serious discussion on whether there should be nationwide reform with respect to considering tribes' views on these types of infrastructure projects," a joint statement by the departments of Justice, Army and the Interior said.

The Standing Rock Sioux Tribe called the Obama administration's intervention "stunning".

"Our hearts are full, this an historic day for the Standing Rock Sioux Tribe and for tribes across the nation," tribal chairman Dave Archambault II said. "Our voices have been heard."

Dakota Access, which is building the pipeline, declined to comment.

Image copyright Getty Images Image caption Activists have dubbed the project "The Black Snake"

When fully connected to existing lines, the 1,770km (1,100-mile) Dakota Access pipeline would be the first to carry crude oil from the Bakken shale, a vast oil formation in North Dakota, Montana and parts of Canada, directly to oil refineries on the US Gulf Coast.

Environmental and local activists believe that the transporting of up to 570,000 barrels of crude oil a day will endanger local waterways.

But proponents of the pipeline believe it to be a safer method of transporting oil than the current methods - rail and road.

A coalition of oil and business interests said the government's move could threaten the jobs of thousands of workers.

"Should the Administration ultimately stop this construction, it would set a horrific precedent," the Midwest Alliance for Infrastructure Now said in a statement.

Over the Labor Day holiday weekend, violence briefly flared between private security forces and protesters who had come from across the United States and Canada.

Six people were bitten by dogs, and 30 were pepper-sprayed, according to a tribal spokesman.