WASHINGTON - A pipeline company agreed to halt until Friday construction of an oil pipeline in parts of North Dakota where a Native American tribe says it has ancient burial and prayer sites, a lawyer for the company said in court on Tuesday.

After violent clashes over the weekend between protesters and security officers near the construction site, the Standing Rock Sioux tribe and a neighboring Native American tribe had asked the U.S. District Court for the District of Columbia on Sunday for a temporary restraining order against Dakota Access, the company building the pipeline.

U.S. Judge James Boasberg said on Tuesday he granted in part and denied in part the temporary restraining order by agreement of the parties. The area in which Dakota Access agreed to halt activity until Friday represented some but not all of the area requested in the temporary restraining order.

Dakota Access had filed its opposition to the tribes’ request early on Tuesday, accusing the Standing Rock Sioux tribe of provoking the violence and breaking the law in trying to stop the pipeline.

A group of firms led by Energy Transfer Partners <ETP.N> is building the 1,100-mile (1,770-km) pipeline. The $3.7 billion project would be the first to bring crude oil from Bakken shale, a vast oil formation in North Dakota, directly to refineries in the U.S. Gulf Coast.

Dakota Access, the limited liability company carrying out the actual construction, had planned for the pipeline to be operational by the fourth quarter of this year, but construction has been dogged since April by protests in North Dakota.

The protests were triggered, the tribes said, when the pipeline company used bulldozers on Saturday to destroy sacred tribal sites whose locations had been identified in court documents filed on Friday.

ROBYN BECK via Getty Images

Dakota Access said in its reply to the requested restraining order that the bulldozers were operating under the company’s construction schedule and did not destroy any important historical sites.

The tribes wanted Dakota Access restrained from working on areas of “significant cultural and historic value,” pending Boasberg’s decision on an injunction they requested last month. It asked the U.S. Army Corps of Engineers, which approved the pipeline project in July, to withdraw permits for the project.

The judge reaffirmed on Tuesday that he would issue a decision about the injunction by Friday.

The U.S. Army Corps of Engineers did not oppose the tribes’ motion for the temporary restraining order. The agency said in a court document filed on Sunday that “the public interest would be served by preserving peace” until the judge issues a ruling on the injunction.

(Reporting by Julia Harte and Mohammad Zargham in Washington; Editing by Frances Kerry and Matthew Lewis)