President Obama, in his first remarks on the standoff over an oil pipeline near the Standing Rock Sioux Reservation in North Dakota, called on both sides to show restraint, and revealed that the Army Corps of Engineers was considering an alternative route for the project.

In an interview with NowThis news published late on Tuesday, Obama said: “We are monitoring this closely. I think as a general rule, my view is that there is a way for us to accommodate sacred lands of Native Americans.

“I think that right now the Army Corps is examining whether there are ways to reroute this pipeline.”

Protesters have been gathering since April outside Cannon Ball, N.D., to rally against the pipeline.

Energy Transfer Partners, which has been working to finish construction on the 1,170-mile, $3.7 billion pipeline, contends it would be a safer way to transport oil from North Dakota to Illinois. But American Indian tribes say it threatens the local water supply, sacred land and tribal burial ground.

The number of protesters has grown to several hundred, many drawn from across the country. Last week, the standoff boiled over as officers in riot gear tried to force crowds from protest camps near Cannon Ball. In the monthslong unrest, more than 400 people have been arrested, some accused of engaging in riots and conspiracy to endanger by fire and explosion.

The two sides have also accused each other of violent tactics, with law enforcement officials accusing the protesters of attacking contractors working on the pipeline. Activists have said that the police have marked them with numbers and held them in “dog kennels.”

But the Morton County Sheriff’s Department said in a statement that the enclosures were “temporary holding cells” made out of chain link fence.

The Army Corps of Engineers was expected to review a crucial stretch of the proposed path for the pipeline, through Army Corps land and under the Missouri River.

Obama said in the interview on Tuesday, “We are going to let it play out for several more weeks and determine whether or not this can be resolved in a way that I think is properly attentive to the traditions of the first Americans.”

Asked to comment on law enforcement tactics, including the use of rubber bullets, Obama said: “It is a challenging situation. I think that my general rule when I talk to governors and state and local officials, whenever they are dealing with protests — including, for example during the Black Lives Matter protests — there is an obligation for protesters to be peaceful, and there is an obligation for authorities to show restraint.

“I want to make sure that as everybody is exercising their constitutional rights to be heard that both sides are refraining from situations that might result in people being hurt,” he added.