Image copyright CBS Image caption Samuel Oliver-Bruno had been living in CityWell United Methodist Church in Durham

An undocumented migrant has been detained after leaving a US church where he had been living in sanctuary for nearly a year.

Samuel Oliver-Bruno, 47, reportedly left the North Carolina church to give fingerprints as part of an application to stay in the state with his family.

But when he arrived for the meeting, US Immigration and Customs Enforcement (ICE) officials detained him.

ICE officials generally avoid making arrests in locations like churches.

Demonstrators tried to stop the officers from taking Mr Oliver-Bruno away, but were themselves detained.

Police arrested 27 people - including a pastor at the church and Mr Oliver-Bruno's son, Daniel - after they refused to let the car carrying the 47 year old leave.

"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 US," an ICE statement said.

But two state representatives, David Price and GK Butterfield, condemned the "abrupt arrest" in a statement and accused ICE of working "in concert" with immigration officials to arrest him.

"At best, Mr Oliver-Bruno was presented with a Catch-22 dilemma; at worst, he was entrapped," the statement read.

Mr Oliver-Bruno had been living in CityWell United Methodist Church in Durham, North Carolina.

According to the advocacy group, Alerta Migratoria NC, Mr Oliver-Bruno went to have his fingerprints taken at the US Citizenship and Immigration office in Morrisville, North Carolina, as part of his application to remain in the state with his wife and son.

But on arrival, plain clothes ICE agents seized him and put him in the back of a van.

According to local paper The News & Observer, the Mexican citizen moved to the US in 1994, followed by his wife two years later.

It is unclear when he returned to Mexico, but he was arrested in May 2014 when he tried to return to the US to be with his wife, who was undergoing heart surgery.

He pleaded guilty to entering the US on false documents and was reportedly released from ICE custody in June 2016, before moving into the church in late 2017.

"If deported, ICE will be delivering Samuel to danger and death," Alerta Migratoria reportedly said in a statement. "Furthermore, ICE is not allowing us to give Samuel his diabetic pills or insulin medication, which is further putting his life in danger."

Bishop Hope Morgan Ward at the church meanwhile asked for intervention from US senators.

"The humanitarian crisis relating to immigration is neither distant nor removed from our shared life," her statement read.