The Trump administration faces challenges to the Keystone XL pipeline project in the courts as well as at the state level this week that could stifle the project.

On the court front, the Trump administration late Friday filed briefs in a Montana federal district court looking to get a lawsuit filed by environmental groups against the pipeline thrown out.

Conservationists and indigenous tribal groups argue that the pipeline's approval did not go through the proper federal environmental review process and that Trump's presidential authority is not sufficient to approve the project.

The president approved the portion of the Keystone XL oil pipeline that extends across the Canadian border to send tar sands oil in Alberta to U.S. refiners 1,200 miles away on the Gulf Coast. President Trump last week underscored the approval of the Keystone XL pipeline as one of his achievements in meeting a campaign promise.

Justice Department lawyers argued in their briefs that the administration's approval of the project in March is immune to the type of lawsuit the environmental groups filed, because the approval "was made solely pursuant to the president's delegated constitutional authority over foreign affairs and national security."

The lawyers said the decision was a presidential action and not subject to the Administrative Procedure Act, which governs all regulatory actions.

But the court battle is not the only place that Keystone XL will face challenges. The pipeline, once it crosses the border, is planned to go through Nebraska, where the state's energy and utility regulators must review and approve the project.

The proceeding in the Nebraska Public Service Commission begins Monday, and environmental and indigenous groups have mounted an extensive campaign to lobby the commission to reject the pipeline. Environmental groups marched on the state capital of Lincoln on Sunday.

But the commission will not be considering the environmental effects of the pipeline. The commission will consider only if the pipeline is in the state's public interest.

"The PSC is tasked with determining whether Keystone XL is in our state's best interest, and the answer is simple: the only people who would benefit from this pipeline being built are oil executives in Canada, while Nebraskans would face the daily threat of a devastating tar sands spill," said John Crabtree, a campaign representative for the Sierra Club. "Keystone XL is all risk and no benefit for Nebraska, and the PSC should reject it."

The state commission is expected to make a decision by November. The deadline for comments is Friday.