Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Federal immigration authorities said Friday they were investigating why an Oregon man was arrested after agents entered the home he was working in without a search warrant.

The arrest of the man — identified later as Carlos Bolanos, 32 — was captured on Thursday by his co-worker while they were painting the inside of a private home in Portland.

Co-worker George Cardenas wrote on Facebook hours after the incident that Immigration and Customs Enforcement agents released Bolanos, but "didn't even give him a reason as to why they released him or took him." He added that agents said the arrest was a "mistake," but didn't clarify what that meant.

In the seven-minute video — viewed on Facebook more than 379,000 times — Cardenas can be heard questioning the three men and one woman after they identify themselves as federal agents and enter the home.

One of the agents insisted that there was no one living in the house and, because it was vacant, they didn't need a warrant. But Cardenas said he never invited any of them inside and continued to ask them to leave. They refused.

"At what point did I say he is here?" Cardenas calmly asked the agents, who are dressed in plainclothes. "At what point did I say come in? At what point, can you please tell me?"

Cardenas asked repeatedly for the agents' names, but they stood silent or declined to provide them.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"We don't need to introduce ourselves by our names. There's no law that says we have to," one of the agents said.

"There's a law that says you can't come into private property. Did you know that?" Cardenas asked.

Related: Immigration Raids Target 'Hundreds' in Sanctuary Cities

"That is correct and you are right," the agent replied.

While the agents stood around, the co-workers said they were calling the homeowner to come to the property. Cardenas warned them that the owner would tell them to leave.

But moments later, the agents arrested Bolanos while he was still on the phone.

An ICE spokeswoman said in a statement that the man who was arrested was released pending further investigation. ICE's Office of Professional Responsibility and the Department of Homeland Security were also reviewing the incident.

ICE did not discuss whether Bolanos' arrest was a "mistake," as Cardenas wrote on Facebook.

Bolanos could not immediately be reached for comment Friday, but his son, Andre Ruiz, told NBC affiliate KGW that "it just got me mad that they did it the way they did it."

Mat Dos Santos, legal director of the American Civil Liberties Union of Oregon, said the video revealed an "appalling and embarrassing moment for ICE," and follows the mistaken arrest of an Oregon man and U.S. citizen by ICE agents last month.

He lauded Cardenas for knowing to tell the agents that they didn't have the right to be in the home without a warrant and said they should have listened to him when he asked them to leave.

Related: U.S. Citizen Questioned by ICE Blames 'Hatred to Latinos'

"You have to say, 'Yes, come in.' But even if he had consented, you can revoke your consent, which he does repeatedly," Dos Santos said.

He added that regardless of Bolanos' immigration status, which was not immediately clear, he is still protected under the U.S. Constitution.

In March, Portland officials declared it a "sanctuary city," which means it is willing to shield undocumented immigrants who may be deported simply over their immigration statuses or low-level criminal offenses. The city was one of 10 places where ICE raided hundreds of undocumented immigrants in a four-day operation last month.

"There is no doubt that this is a greater pattern that is going hand in hand with the inhumane increase of enforcement actions taken by ICE," Dos Santos said.