An undocumented immigrant who has been taking sanctuary in a North Carolina church for more than a year was taken into custody on Friday as he left the church for a meeting at the U.S. Immigration office.

Samuel Oliver-Bruno, a 47-year-old Mexican national, had recently submitted a petition for deferred action and was complying with a “procedural biometrics appointment for a background check” with the U.S. Citizenship and Immigration office in Morrisville, North Carolina, when he was taken into custody, according to a statement from immigrant advocacy group Alerta Migratoria NC.

He has been living in the basement of the CityWell United Methodist Church in Durham since late 2017, Raleigh-based newspaper The News and Observer reported.

Oliver-Bruno was surrounded by U.S. Immigration and Customs Enforcement agents in plain clothes “just minutes” after entering the USCIS office while accompanied by his 19-year-old son, his immigration attorneys and members of the clergy and community, according to Alerta Migratoria. He was then “forced” into a van around the back of the building, but his supporters, who were waiting outside the office, “rushed to block the vehicle,” the advocacy group said.

Demonstrators who blocked the van were arrested, a spokeswoman for the Morrisville Police Department told ABC News.

Officers called to the scene tried to warn the group surrounding the van that they would be arrested for obstruction if they did not disperse, the spokeswoman said. Twenty-seven people, including Citywell pastor Cleve May, were arrested when they refused to comply, police said.

“They did not want to move from out in front of the van,” the spokeswoman said. “Our police officers had to place them under arrest for not giving [the van] the right of way.”

Some members of the crowd leaned their torsos over the hood of the van, video posted onto Alerta Migratoria’s Facebook page shows.

A woman with the Wake County Sheriff’s Office — the law enforcement office that presided over the protest scene at the church — declined to provide a comment to ABC News.

An ICE spokesman confirmed to ABC News that Oliver-Bruno was arrested as part of a “targeted enforcement action.”

“Mr. Oliver-Bruno is a convicted criminal who has received all appropriate legal process under federal law, has no outstanding appeals, and has no legal basis to remain in the U.S.,” Bryan Cox, ICE director of communications for the southern region, said in a statement.

Oliver-Bruno’s son, Daniel Oliver-Perez, was among the protesters arrested, ABC Raleigh-Durham affiliate WTVD reported. Oliver-Perez is a U.S. citizen, The News and Observer reported.

Oliver-Bruno was taken to the ICE office in Cary, North Carolina, the advocacy group said, adding that the detainment has placed his life in danger.

“If deported, Samuel fears for his life,” Alerta Migratoria said in a statement. “If deported, Samuel will be returned to the state of Veracruz, where his family has recently faced threats and which is a state that is constantly in threat of drug cartels. If deported, ICE will be delivering Samuel to danger and death. Furthermore, ICE is not allowing us to give Samuel his diabetic pills or insulin medication, which is further putting his life in danger.”

Oliver-Bruno appeared in a video on Alerta Migratoria’s Facebook page Wednesday, asking for support in Spanish for when he entered the “wolf cave.”

In May 2014, Oliver Bruno was arrested by U.S. Border Patrol agents in El Paso, Texas, “while attempting to enter the U.S. using fraudulent documents,” Cox said. He was then paroled “solely for federal criminal prosecution” and was convicted in U.S. District Court for the Western District of Texas later that month, Cox said.

Oliver-Bruno was released from ICE custody in June 2016, and his case has since “been subject to extensive appeals,” Cox said, adding that officials “ultimately concluded Mr. Oliver Bruno has no legal basis to remain in the U.S.,” Cox said.

USCIS had requested that Oliver-Bruno provide fingerprints in person, a requirement for his deferred deportation petition, The News and Observer reported. He moved from his home in Greenville to the church last year after ICE notified him that it would no longer practice discretion for his removal, the local newspaper reported. ICE does not typically make arrests at churches, schools or hospitals.

Oliver-Bruno left Mexico in 1994, and his wife came to the U.S. two years later on a work permit, The News and Observer reported. It is unclear when and why he initially left the U.S., but his attempt to cross the border again in 2014 was to be with his wife, who was undergoing open heart surgery in the U.S., according to the newspaper.