Protesters block one of two buses carrying ICE detainees Wednesday in Bend, Oregon.
CNN  — 

Scores of people in an Oregon city blocked the path of buses carrying ICE detainees for hours Wednesday, until federal agents arrived and removed the detainees and some officers from the vehicles overnight, CNN affiliate KTVZ reported.

The intervening federal agents appeared to use a spray to compel protesters to move from the unmarked buses after the nearly 12-hour standoff in the city of Bend, KTVZ reported.

The federal agents have since left the scene, near an office building, and the crowd dispersed peacefully, Bend police said in a tweet early Thursday. Details about where the detainees and agents went weren’t immediately available.

The arrests that led up to the standoff were of two undocumented people with “a history of criminal violent behavior,” the Department of Homeland Security said without releasing further details about them.

Acting DHS Deputy Secretary Ken Cuccinelli criticized the standoff and defended federal agents’ intervention.

“While ICE respects the rights of people to voice their opinion peacefully, that does not include illegally interfering with their federal law enforcement duties,” Cuccinelli said in a statement. “ICE will take all necessary measures to ensure the safety of its officers and detainees, and will vigorously pursue protection against anyone who puts them in harm’s way.”

When federal agents arrived at the scene Wednesday night, someone said over a bullhorn that one of the bus occupants had a life-threatening medical emergency and therefore needed to be removed, KTVZ reported.

Video from KTVZ showed the agents, holding batons and wearing tactical gear including helmets and face shields, walking in the parking lot as members of the crowd followed, yelled and jeered.

“Feds go home!” someone shouted, according to the affiliate.

What started the standoff

The standoff began Wednesday afternoon when a man, apparently aware that ICE had detained someone or some people, stepped in front of one of the buses in a parking lot in Bend, refused to move, and began livestreaming on Facebook, KTVZ reported.

That eventually drew a crowd, gathered in part to oppose the arrests. Within hours, some in the crowd held signs with messages including, “Stop separating families,” “It ain’t right” and “Where is the love?” KTVZ reported.

Local police tweeted they arrived “to allow free speech” and make sure the demonstration was safe, but repeatedly sought to distance their actions from the ICE detentions. “We are not there in an assisting role with ICE,” they tweeted.

Bend Police Chief Mike Krantz said his department was aware Tuesday and Wednesday “that ICE agents were in Bend for an investigation, however we were not made aware of their detailed plans.”

“The Bend police are not involved with ICE operations,” Krantz said. “We do not use funds or personnel or equipment to enforce federal immigration laws or to detain people based on immigration status. This is consistent with Oregon law and department policies.”

Before the standoff ended, the district attorney for Deschutes County, where Bend is located, tweeted that he had been at the scene and was “impressed by the passion and empathy shown by our community.”

The district attorney, John Hummel, added that both he, the governor, the mayor and the police chief “have been trying to broker a resolution with DHS, to no avail.”

“We’re here,” he tweeted at Acting DHS Secretary Chad Wolf, “let’s work it out.”

CNN has reached out to the governor’s office for comment.

ICE regional spokeswoman Tanya Roman said that “due to law enforcement sensitivities and officer safety, ICE does not discuss planned operations.”

“Despite severe challenges, ICE remains committed to our public safety mission and ICE officers will continue to perform their sworn duty to seek out dangerous criminal aliens and other immigration violators,” her statement to KTVZ reads. “ICE seeks straightforward cooperation with state and local law enforcement and has never requested them to enforce federal immigration law.”

CNN’s Christina Walker contributed to this report.