“I couldn’t see anything and my ears hurt,” Mr. Assem said. “But if I can’t see what is in front of me and I have to fall down, that was my problem, not their problem. Most of the time they told me I could not move.”

According to the Egyptian government, Mr. Assem was charged with burning a police vehicle and with incitement on the Internet to burn a police vehicle.

He has denied the charges.

On Thursday, speaking publicly about his ordeal for the first time, Mr. Assem said that after his detention in Cairo he spent roughly two weeks in a jail in Asyut, about six hours away, where he was initially placed in a cell filled with people accused of theft or murder. He was eventually transferred and released on bail, he said.

Even after his arrest, Mr. Assem said, he was confident he would be allowed to travel to the United States with 14 other students to participate in the science competition. But officers stopped him just moments before he was to board the plane.

After pressure from the Egyptian news media, he was allowed to fly to California the next day, just in time to attend the science competition.

Although several people had warned Mr. Assem against returning to Egypt, it was not until he arrived at Los Angeles International Airport on Saturday, the day of his scheduled return, that he decided to stay in the United States, Mr. Assem said.

He asked the four adults chaperoning his group for assurances that he would be safe if he were to return. “There is nothing we can do,” they answered.