Two dozen people were arrested after an illegal immigrant was detained leaving a North Carolina sanctuary church that had been his refuge from deportation for nearly a year.

Immigration agents arrested Samuel Oliver-Bruno, 47, Friday at an immigration office in Raleigh.

Oliver-Bruno went to the office to have his fingerprints taken in connection with his petition to stay in the U.S. while he fights being deported to Mexico.

Police arrested 27 people after they blocked the vehicle taking him to detention, Fox 8 High Point reported Saturday.

Oliver-Bruno was given sanctuary at CityWell United Church in Durham 11 months ago. Immigration officers are generally reluctant to make arrests at churches and other sensitive locations.

"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.," ICE spokesman Bryan Cox said, according to the station.

Immigration Customs Enforcement said Oliver-Bruno, who has lived in North Carolina for two decades, had no legal basis to be in the U.S. and had exhausted his "extensive" appeals. Oliver-Bruno pleaded guilty in 2014 to using false documents to try to re-enter the U.S. in Texas after a trip outside the country, according to court documents.

But North Carolina Democratic Reps. David Price and G.K. Butterfield condemned the arrest as a setup.

"It appears ICE has acted in concert with officials at (U.S. Citizenship and Immigration Services), who instructed Mr. Oliver-Bruno to appear at local USCIS offices to discuss his deferred deportation," the lawmakers said, according to Fox 8.

"At best, Mr. Oliver-Bruno was presented with a catch-22 dilemma; at worst, he was entrapped," they added.

The Associated Press contributed to this report.