Official and mayoral candidate Brad Lander is handcuffed by masked US federal agents.

New York City Comptroller Brad Lander has been arrested by federal agents at an immigration court, as the administration of US President Donald Trump steps up its confrontational approach with local officials over immigration raids.

Lander, a central candidate in the city’s Democratic primary election for mayor, was escorting a defendant out of court on Tuesday as part of an effort to observe immigration hearings and promote legal services for immigrants when he was arrested by United States Immigration and Customs Enforcement (ICE).

“While escorting a defendant out of immigration court at 26 Federal Plaza, Brad was taken by masked agents and detained by ICE,” reads a post on Lander’s social media account that says it was written by his wife.

The arrest is the latest case of the Trump administration taking a harsh stance towards Democratic officials who are critical of its aggressive approach to immigration enforcement. Federal immigration agencies have stepped up apprehensions at immigration courts in recent weeks, a practice that critics say discourages immigrants from participating in the judicial system.