Free speech advocates on Monday accused federal immigration officials of violating a Bakersfield activist’s First Amendment rights when he was detained in May, two days after he recited a poem critical of the federal immigration agency at a public meeting.

Attorneys from the American Civil Liberties Union argued in San Francisco federal court that U.S. Immigration and Customs Enforcement officials detained 22-year-old Jose Omar Bello Reyes as retribution for the poem.

“What’s at stake is the right of not only an immigrant, but anyone to criticize the federal government without fear of retaliation for those criticisms,” attorney Jordan Wells said outside the Phillip Burton Federal Building.

At a May forum where Kern County officials discussed ICE’s access to the community, Bello recited a poem called “Dear America” that criticized the nation’s immigration policies, particularly the practice of family separations.

“You and your administration caused fear, fear through separation,” Bello read to the Kern County Board of Supervisors. “Instead of building trust with people, do y’all prefer this racial tension?”

Attorneys said the activist and Bakersfield college student was detained two days later outside his home.

Officials previously detained Bello for deportation in May 2018, but a federal immigration judge ordered his release on $10,000 bond. Bello was arrested in January 2019 for driving under the influence and pleaded no contest, according to Kern County court records.

ICE did not detain Bello for nearly four months after the DUI arrest, and the timing suggests retaliation, Wells said.

“If left unaddressed, ICE’s actions will chill immigrant speakers from sharing criticisms of the agency at the very same time that its escalating aggression and increasing use of detention are at the center of public debate,” the ACLU wrote in the suit filed in June.

U.S. Magistrate Judge Sallie Kim called the timeline “suspicious,” but she did not make a decision Monday.

Several other activists and journalists have been detained in recent years following protests against immigration policy, advocates said.

Nearly 50 friends, family members and supporters of Bello gathered Monday outside the federal courthouse to protest his detention. Edith Mata, Bello’s girlfriend, said his detainment and recent reports of a nationwide immigration crackdown have had an unsettling effect in their community.

“We no longer want to raise our voices,” Mata said.

The suit also claims ICE violated due process rights by imposing a $50,000 bond that Bello could not make. Benjamin Wolinsky, a U.S. attorney representing the federal government, did not provide evidence against the retaliatory claim at the hearing.

Months could pass before Kim returns a decision on the suit.

Bello is being held at the Mesa Verde Detention Facility in Bakersfield.

Gwendolyn Wu is a San Francisco Chronicle staff writer. Email: gwendolyn.wu@sfchronicle.com Twitter: @gwendolynawu