NEW YORK — Ahmed knew he faced arrest if he continued to sit in the waiting room outside Courtroom 34, on the 12th floor of 26 Federal Plaza. The man sitting across from him told him so.

The man, a concerned federal worker who’d come to immigration court in his free time and compared ICE officers to Nazi Gestapo, had practically begged Ahmed, who is being identified by a pseudonym to protect his privacy, to stand up and walk out of the room with him.

“You didn’t bring any water?” the man whispered, suggesting Ahmed leave with him to get a drink. He overturned his pointer and middle fingers, scurrying them along his palm to mime Ahmed leaving the room.

Since late May, federal agents have swarmed immigration courts across the country, arresting people who show up to their appointments, pass through metal detectors and identify themselves by name in open hearings. It was my fifth day attending court, and I’d seen plenty of these arrests already.

“He thinks that you’re at risk of being arrested,” I told Ahmed, referring to the man trying to entice him to leave. I motioned to the clutch of agents, most of them wearing masks, who’d been eyeing us from a few feet away. The waiting room wasn’t bigger than a shipping container. A few minutes earlier, I had seen one of them glance at the name listed on the paperwork Ahmed was holding, checking it against another document. “The paper they’re pointing to, it’s a list of people to be arrested.”