For months, residents of Boone, Iowa, and the surrounding region packed town hall meetings, attended rallies and signed petitions in mass displays of support for a project many there hoped would give the rural economy a much-needed lift: construction of an oil pipeline that would create more than a thousand jobs.

In fact, once state and federal officials approved the project, known as the Dakota Access Pipeline, earlier this year, Boone became a rush of last-minute activity – with community leaders like Kurt Phillips, head of business chamber, phoning local hotels, trailer parks and campgrounds to find living quarters for the onslaught of workers expected to arrive.

“We’re getting constant inquiries,” Phillips said, referring to the sudden demand for housing. “Our understanding is that waves of groups of workers are coming.”

Suddenly, though, those plans are in limbo after environmental activists sought an injunction in the District Court in Washington D.C. to halt construction of the project as it is set to begin in North Dakota. It is a fight that will likely delay and possibly jeopardize the project, as it quickly becomes a symbol of the sharp ideological split in the debate over national energy policy and the impact that policy has on the economy and the environment.

In this instance, though, the split is not just the predictable Republican-versus-Democrat wrangling. It also involves significant intramural squabbling within the Democratic Party that pits two of its most influential coalitions, organized labor and the environmental movement, in what has been an ongoing jobs-versus-environment debate throughout the country.

The standoff may complicate the political calculations for the Democratic Party with Election Day just a little over two months away. Organized labor, with a vast get-out-the-vote operation that has delivered consistently for Democrats, is increasingly frustrated with party leaders for supporting efforts by environmental groups to defeat proposed energy projects backed by unions.

The defeats include the Keystone XL oil pipeline, a project that organized labor supported but that both President Barack Obama and Hillary Clinton opposed after coming under pressure from prominent environmentalists including Tom Steyer, a major donor to the Democratic Party.

In a measure of the divide in the party, Hillary Clinton has refused to take a position on the Dakota Access Pipeline project, reflecting her presidential campaign’s desire to appease organized labor – or at least not antagonize it. But Senator Bernie Sanders of Vermont, whose presidential candidacy drew strength from liberal disenchantment, traveled to the region to protest the construction of the pipeline.

The pipeline – which will carry oil 1,100 miles from North Dakota, through South Dakota and Iowa, before reaching terminals in Illinois – had begun construction after receiving the necessary approval from state and federal officials after months of public hearings and other reviews.

But earlier this month, EarthJustice, a national environmental group, filed a lawsuit and sought an injunction to halt construction on behalf of the Standing Rock Sioux Tribe. The lawsuit claims that the Army Corps of Engineers, an agency with jurisdiction over the project, failed to give the tribe sufficient time to assess the impact of the pipeline on cultural sites and water sources along the route.

In an opinion article last week published in The New York Times, David Archambault II, Standing Rock Sioux Tribe’s Chairman, put the matter in blunt terms, claiming that that the pipeline project was “fast-tracked,” and pledging that his tribe will not pay the “price for America’s prosperity” by allowing its construction.

The appeals to tribal sovereignty have introduced a striking degree of emotion that environmental activists have sought to harness in a campaign effort that has drawn prominent environmental groups from Washington and celebrities from Hollywood.

But for all the objections raised by the Standing Rock Sioux Tribe, the account provided by the Army Corps of Engineers paints a starkly different picture. In legal filings, the agency notes that that it began meeting with the Standing Rock Sioux Tribe about the pipeline and its potential impact in September 2014. In the nearly two years that followed, representatives of the Army Corps met about 10 times with tribal leaders, while also being in communication with the Tribe more than 75 times, according to the documents.

With Federal District Judge James Boasberg set to rule on the fate of the pipeline by September 9, both sides are gearing up for a battle that will likely extend long after the judge’s ruling and unfold with continued litigation and additional protests and acts of civil disobedience throughout the four-state region.

Thirty-one environmental groups, including 350.org, the Bold Alliance, and Oil Change International, sent a letter to the White House urging the administration to reconsider the permits for the project, claiming the Army Corps of Engineers did not adequately access the threat of the project to water resources.

But four prominent labor organizations sent their own letter, this one to North Dakota Governor Jack Dalyrmple, objecting that while the pipeline itself was “lawfully approved,” environmental activists have created dangerous conditions through unlawful protests and civil disobedience.