LOS ANGELES (AP) — Attorneys for Sami Hamdi, a British political commentator held by U.S. Immigration and Customs Enforcement in California, are challenging his detention in court, according to his legal team on Wednesday.

Hamdi, who is Muslim, was detained on Sunday by ICE officers at San Francisco International Airport, as federal officials confirmed. His lawyers claim the arrest stems from his outspoken criticism of the Israeli government, while U.S. authorities cite remarks he made following Hamas’ October 7, 2023, attacks, which they assert celebrated the violence.

The detention aligns with broader efforts by the current administration to identify and potentially expel foreign individuals accused of inciting unrest or supporting protests against Israel’s military operations in Gaza.

These enforcement actions have faced backlash from civil rights organizations, arguing that they violate constitutional free speech protections that apply to everyone within the U.S., not just American citizens.

The Council on American-Islamic Relations (CAIR), which is representing Hamdi, filed a writ of habeas corpus demanding that the government clarify the reasons for his detention. They also requested a temporary restraining order to secure a bond hearing and prevent Hamdi’s removal while the case is being resolved.

“If the government can revoke a valid visa simply due to unfavorable opinions, then anyone in the U.S. on a temporary basis is at risk of politically motivated detention,” CAIR stated in a press release. “This must end with Sami Hamdi.”

Hamdi, 35, was reportedly taken into custody due to his vocal opposition to Israeli policy during a speaking tour in the U.S., where he had recently addressed CAIR's Sacramento gala. He was scheduled to speak at another event in Florida.

Department of Homeland Security spokesperson Tricia McLaughlin has labeled Hamdi’s legal filings as “a desperate Hail Mary attempt to keep an illegal alien and terrorist sympathizer” in the U.S. McLaughlin criticized Hamdi for purportedly celebrating the Hamas attacks in an online video, claiming he expressed euphoria over the violence. Hamdi has denied these accusations, arguing his comments intended to highlight the oppression faced by Palestinians.

ICE noted that Hamdi entered the U.S. on October 19 on a visitor visa, which was revoked just days later on October 24, leading to his initiation of removal proceedings.