Updated

A high school football player who was detained for possible deportation just weeks before he was to graduate from a Tucson high school was released from immigration lockup, but his future in the U.S. remains uncertain, federal officials said Wednesday.

Yasmeen Pitts O'Keefe of Immigration and Customs Enforcement confirmed that 18-year-old Thomas Torres had been freed from custody. But she said he was placed into deportation proceedings and a judge must still hear his case.

"On May 7, ICE placed Mr. Torres-Maytorena into removal proceedings and released him from custody," the spokeswoman said in a written statement. "An immigration judge with the Department of Justice Executive Office for Immigration Review will determine if Mr. Torres-Maytorena has legal basis to remain in the United States."

She did not say when Torres must appear in court. It remained unclear whether he will graduate May 22 as scheduled.

Nevertheless, Torres' friends rejoiced over his release, with family friend Lorena Rodriguez declaring on her Facebook page, "OPERATION THOMAS COMPLETE!"

"I want to give a huge thanks to every single Desert View student, teacher and faculty member who stood by our side throughout this traumatic experience," wrote Rodriguez, who launched a GoFundMe page to raise money for Torres's legal costs.

Rodriguez did not immediately return several telephone calls and email messages seeking additional information. Torres could not be located for comment.

Torres was brought to the United States as a small boy, and he went to live with Rodriguez's family after his own relatives returned to Mexico.

His detention last week prompted about 120 classmates to protest Monday outside the Pima County Sheriff's Office.

Sheriff's deputies had contacted the Border Patrol on Thursday after Torres acknowledged during a traffic stop that he was in the U.S. illegally. The sheriff's office said Wednesday it had no additional information about his case.

The Border Patrol confirmed that it initially held Torres, but said Wednesday it later transferred him to ICE.

Friends said Torres played on the Desert View High School football team and regularly worked several jobs, including busing tables at a restaurant and yardwork.

Although deportation proceedings involving high school students who have reached adulthood are not uncommon, the outpouring of support from Torres' classmates seemed unusual. A large portion of the population in Tucson's southern district, where the school is located, is Mexican American.