(Reuters) - A 24-year-old farm worker accused of killing an Iowa college student who vanished while jogging made a first court appearance on Wednesday as the case reignited a national debate over illegal immigration and crime.

Cristhian Rivera, who was led into Poweshiek County Court handcuffed and dressed in black-and-white striped prison garb, was ordered by a judge held on $5 million bail on charges of murdering 20-year-old Mollie Tibbetts.

The judge rejected a request by Rivera’s attorneys to bar reporters and the public from court proceedings. The lawyers cited exhaustive media coverage centering in part on whether the suspect was an illegal immigrant, as prosecutors have said.

President Donald Trump, whose pledge to build a wall on the border of Mexico was central to his successful run for office, has mentioned the case at least twice since Rivera’s arrest, most recently in a videotaped speech posted to Twitter on Wednesday.

“Mollie Tibbetts, an incredible young woman, is now permanently separated from her family. A person came in from Mexico, illegally, and killed her. We need the wall. We need our immigration laws changed,” Trump said.

Lawyers for Rivera cited Trump’s comments in a written motion seeking a gag order as well as a ruling that prosecutors could only refer to the defendant as a “documented resident.”

In the court papers, attorney Allan Richards asserted that, contrary to what prosecutors had said, his client was in the country legally.

Slideshow ( 6 images )

“Former leader of Iowa’s educational system (The Iowa Board of Regents) Craig Lang has verified that Cristhian is in this jurisdiction legally,” Richards wrote. “Cristhian has complied with his documented status since arriving in the USA as a minor.”

Lang is co-owner of the family dairy farm near Brooklyn, Iowa where Rivera worked until his arrest on Monday. The farm initially issued a statement saying that his legal status had been confirmed with the U.S. government’s E-Verify system.

However Lang’s son, Dane, told reporters on Wednesday that Rivera had used another name when applying for work there four years ago and that managers did not use the E-Verify system. Representatives for U.S. Immigration and Customs Enforcement did not respond on Wednesday to questions regarding Rivera’s immigration status.

Rivera was arrested on Monday after police said he was identified in security video taken from a camera outside the Brooklyn house near where Tibbetts was last seen running.

A woman’s body was found on Tuesday in a cornfield about 10 miles from the Brooklyn home of Tibbetts’ boyfriend, where she was staying.

No positive identification had been made on those remains as of Wednesday afternoon, said Mitch Mortvedt, spokesman for the Iowa Department of Public Safety, by telephone.