After years of heated debate, oil started flowing through the Dakota Access Pipeline for the first time this summer. But a recent ruling from a federal judge has put its future in question once again.

US District Court Judge James Boasberg has ruled permits for the controversial oil pipeline were issued without proper consideration of its environmental impacts, and must be reconsidered. He has yet to rule on whether oil transport will be shut down in the interim.

The Standing Rock Sioux Tribe has long protested the construction of the 1,168-mile pipeline, which runs within a half-mile of their North Dakota reservation. The tribe argues the pipeline threatens cultural and historical sites, desecrates sacred waters, and poses an environmental threat to the reservation.

Former President Barack Obama halted construction on the pipeline in 2016, pending an environmental impact statement from outside analysts.

President Donald Trump, however, ordered the US Army Corps of Engineers to issue permits for its construction shortly after his inauguration.

White House Press Secretary Sean Spicer said at the time that the president was "very, very keen" to maximise use of America's natural resources.

“It’s good for economic growth, it’s good for jobs, and it’s good for American energy,” he said.

Protesters occupy Standing Rock reservation, North Dakota Show all 15 1 /15 Protesters occupy Standing Rock reservation, North Dakota Protesters occupy Standing Rock reservation, North Dakota A person pours a pepper spray antidote into a protester's eyes during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota Reuters Protesters occupy Standing Rock reservation, North Dakota People swim across a river to where the police officers are standing guard during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota Reuters Protesters occupy Standing Rock reservation, North Dakota A man holds up a ceremonial object while police officers look down from a hill during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota, U.S Reuters Protesters occupy Standing Rock reservation, North Dakota People protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota November Reuters Protesters occupy Standing Rock reservation, North Dakota Two people stand in the water of a river while police officers guard the shore during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota Reuters Protesters occupy Standing Rock reservation, North Dakota A man stands on a makeshift bridge over a river while police officers stand on the opposite shore during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota, U.S Reuters Protesters occupy Standing Rock reservation, North Dakota Police use pepper spray against protesters in a boat during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota, U.S Reuters Protesters occupy Standing Rock reservation, North Dakota Police use pepper spray against protesters in a boat during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota, U.S Reuters Protesters occupy Standing Rock reservation, North Dakota Police use pepper spray against protesters in a boat during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota, U.S Reuters Protesters occupy Standing Rock reservation, North Dakota Tonya Stands recovers after being pepper sprayed by police after swimming across a creek with other protesters hoping to build a new camp to block construction of the Dakota Access Pipeline, near Cannon Ball, Reuters Protesters occupy Standing Rock reservation, North Dakota Dakota Access Pipeline protesters stand in the foreground and in the waist-deep water of the Cantapeta Creek, northeast of the Oceti Sakowin Camp, near Cannon Ball, N.D., Wednesday, Nov. 2, 2016. Officers in riot gear clashed again Wednesday with protesters near the Dakota Access pipeline, hitting dozens with pepper spray as they waded through waist-deep water in an attempt to reach property owned by the pipeline's developer. Reuters Protesters occupy Standing Rock reservation, North Dakota Dakota Access Pipeline protesters stand in the foreground and in the waist-deep water of the Cantapeta Creek, northeast of the Oceti Sakowin Camp, near Cannon Ball, N.D., Wednesday, Nov. 2, 2016. Officers in riot gear clashed again Wednesday with protesters near the Dakota Access pipeline, hitting dozens with pepper spray as they waded through waist-deep water in an attempt to reach property owned by the pipeline's developer. Reuters Protesters occupy Standing Rock reservation, North Dakota People who were tear gassed return to the shore during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota, Reuters Protesters occupy Standing Rock reservation, North Dakota People yell at police officers standing on the opposite shore of a river during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota, U.S Reuters Protesters occupy Standing Rock reservation, North Dakota Police use pepper spray against protesters in a boat during a protest against the building of a pipeline on the Standing Rock Indian Reservation near Cannonball, North Dakota, U.S Reuters

Now, Mr Boasberg says the permits were issued without proper consideration of the environmental impact statement. In particular, the Corps failed to adequately review the pipeline’s effect on fishing rights, hunting rights, environmental justice, or the controversial nature of its construction.

“To remedy those violations, the Corps will have to reconsider those sections of its environmental analysis upon remand by the Court," the judge wrote.

A later ruling will decide whether pipeline operations must cease in the interim.

This is the Standing Rock Sioux tribe’s third attempt to block the pipeline through legal action. Last summer, thousands of people gathered near the construction site to try to shut down the pipeline through protest. The Army Corps shut down the protests in February.

Tribe Chairman Dave Archambault II called the judge's ruling a “significant victory”.

“The previous administration painstakingly considered the impacts of this pipeline, and President Trump hastily dismissed these careful environmental considerations in favour of political and personal interests,” he said in a statement.

The chairman added that he would ask the court shut down pipeline operations immediately.

Other members of the tribe, however, were hesitant to declare victory.

Chase Iron Eyes – an attorney for Lakota Law, which represents some of the tribe members – says he felt hopeful when Mr Obama halted the pipeline's construction in 2016. But now that Mr Trump has allowed it to be completed, he has little hope the tribe's circumstances will change.

"I live right here on Standing Rock, and when that pipeline breaks, it’s my children who are going to suffer," he told The Independent. "Unless something gives me an objectively reasonable indication that circumstances could be changed then I’m going to take these things with a grain of salt."

The court victory, he added, rings hollow now that the pipeline is already in the ground.

“I can’t pin down anything other than a good vibe coming from the fact that something went our way," he said. "Something probably should have gone our way before construction began.”