Gonzalez called the tactic a “betrayal” of his clients’ trust in the system. When he raised the issue of ICE agents being spotted in the parking lot, he said, a judge responded, “I don’t know what’s going on outside.”

“I’ve always felt that courthouses are supposed to be a safe place where people go to resolve their issues and try to get right,” Gonzalez said. “I found that to be such a betrayal of not only the community that uses their services but also a betrayal of my practice, to call myself an attorney, encouraging these poor people to show up and then to have them go through that trauma.

“At this point, I can’t guarantee the safety of my clients,” he said. “I can’t in good conscience tell them that they’re not in danger.”

A spokesperson for the Executive Office for Immigration Review declined to comment on whether the judges were aware of federal immigration agents in and around the courthouse. A representative from the Department of Homeland Security could not be reached for comment.

Federal officials have said that detaining people at immigration courthouses is more efficient than deploying agents to track them down after they head out following a hearing and try to resume their lives.

“If an individual is going through proceedings, and he’s going to take a deportation order, then and there we want to make the arrest of that individual,” Garrett J. Ripa, a senior ICE official in Miami, said in The New York Times.

Arresting people at courthouses, however, will make others too frightened to attend their hearings, “ultimately pushing people further into the shadows and out of legal status,” Deborah Fleischaker, a senior ICE official during the Biden administration, told the Times.

The Trump administration has said targeting violent criminals would be a priority for its mass immigration sweeps. But advocates cite government data showing a majority of the people detained by ICE had no criminal convictions, facing only civil immigration charges, such as being undocumented, CBS News reported.

The Orange County Rapid Response Network, made up of community members, lawyers, and others who monitor and verify ICE sightings and support immigrants and their families facing detention or deportation, confirmed the presence of 12 immigration agents at the Santa Ana courthouse on the morning of July 8.

A spokesperson for the network said the agents were there for the morning docket and followed an arrest pattern that targeted asylum-seekers with fewer than two years in the country and visa overstays, as well as people with criminal records or previous detentions.

Inside the courthouse that day, four paramedics rushed to help a woman who had suffered an anxiety attack and was struggling to breathe after she was detained by federal agents inside the courtroom. A woman who witnessed the ordeal said the woman’s lips turned purple, and she had begun to shake and convulse. Yet, she said, none of the federal agents checked to see how she was doing.

She asked not to be named for fear of being targeted.

Gonzalez heard the woman having a panic attack and said court security staff seemed concerned for her health and safety. He watched the paramedics rush her out in a gurney. When he stepped outside into the parking lot, he saw two detention officers in a van follow the ambulance transporting the woman.

“I saw vans that weren’t here when I first arrived,” Gonzalez said. “I saw them with men in the front wearing masks. I didn’t know who they were. They looked private and very threatening because the vans are clearly law enforcement type vans with cages inside and metal frames inside the windows.

“We’ve heard that (federal officers) were out there,” he added, “but this is the first time I saw it with my own eyes. And it was in the most gross way possible — it shocked me.”

Layla, a 43-year-old Riverside woman and asylum-seeker from China, told a reporter her boyfriend was taken by ICE that morning. She found out after he used his one phone call to tell her he had been detained and urged her to go home. His asylum application had been rejected at his court hearing, and he was “taken away” by federal agents, she said. He did not have an attorney. It was not clear what stage his case was in.

“I was shocked,” she said in Mandarin, which was translated into English using an app on her phone. “I can’t live without him. I want to do everything I can to get him back.”

That week, a mother and young son were detained by federal immigration agents inside the courthouse. The agents escorted the mother toward a staircase leading to the back of the court parking lot. She looked scared and confused. The little boy, who stood beside his mother, appeared to ignore the surrounding commotion, his eyes glazed over as he wrote on the side of his crayon box in a repetitive motion.

Details about the woman’s case were not immediately available.

Lance Powell, an immigration attorney who has worked in the field for eight years, said judges inside the courthouse have said they’re not aware of the federal officers’ presence. He felt his integrity had been questioned after he was essentially told to “prove it” to the judges.

Powell said he has seen judges ask legal observers to publicly identify themselves but have allowed federal officers to remain anonymous, including one account where an officer pointed at a DHS attorney and said, “I’m with them.”

“It’s really disheartening to see,” he said. “It’s not just affecting immigrants, but the whole legal community.”

The Associated Press contributed to this report.