(CNN) An immigration judge has granted asylum to a Connecticut high school student whose arrest sparked an outpouring of support from teachers and classmates .

Mario Aguilar, 18, was released from ICE custody Tuesday afternoon, hours after supporters held a news conference calling for release.

"He is on his way home," attorney Dalia Fuleihan wrote in an email to CNN.

After ICE arrested Aguilar in September, teachers sent him schoolwork so he wouldn't fall behind and traveled to court hearings so he'd see a friendly face.

Students saved his seat, made "Free Mario" signs in the school's print shop and rallied for his release.

English language teacher Cynthia Clampitt wrote instructions for Mario on sticky notes in the homework packet she sent him.

The community at Wilbur Cross High School in New Haven, Connecticut, which CNN featured in a story earlier this month , had been anxiously awaiting a ruling in the case for weeks.

Aguilar's supporters said they'd finally gotten good news Monday when attorneys received written notice of the judge's ruling.

By Tuesday, community leaders speaking to reporters from CNN affiliate WFSB and other local media at a City Hall news conference cautioned that the court decision was only a partial victory. Advocates said they were worried the teen could spend months longer behind bars if the government decided to appeal the judge's decision.

Fuleihan said Tuesday evening it's still unclear whether the Department of Homeland Security will appeal.

ICE has 30 days to decide whether to appeal

An Immigration and Customs Enforcement spokeswoman said the agency "does not comment on issues/claims/allegations not related to a detainee's enforcement status without a signed privacy waiver from the individual."

ICE attorneys have 30 days after a ruling to tell a judge whether they'll appeal. If they appeal, proceedings could continue for up to a year, Fuleihan said.

A bulletin board dedicated to Mario Aguilar hangs in the hallway at Wilbur Cross High School in New Haven, Connecticut. Since ICE detained Aguilar in September, students, teachers and administrators at the school have been pushing for his release.

Aguilar was born in Guatemala and came to the United States as an unaccompanied minor in 2018. His attorneys say he was fleeing persecution and seeking safety.

ICE deportation officers arrested him in September outside a Connecticut courthouse where he'd gone to face charges after a car accident, including driving under the influence, operating a motor vehicle without a license and failure to insure a private motor vehicle.

An ICE spokesman told CNN earlier this month that he'd been arrested for immigration violations and that removal proceedings were pending.

Students at Wilbur Cross made #bringmariohome stickers in the school's print shop and sold them to raise money for his commisary.

Advocates for Aguilar say he crashed into a parked car after his cell phone slid off the dashboard and he reached down to pick it up. They argue a sobriety test was never performed and the DUI charge wouldn't have held up in court.

They've been pushing for months for ICE to release him, arguing he's not dangerous or a flight risk -- and deserves to return to his community and continue his studies.

He never got the schoolwork teachers sent

Ann Brillante, an assistant principal at Wilbur Cross, told CNN that teachers at the school have a good reason to want their student back in class.

"It's urgent," she said. "Every minute counts in terms of learning English and in terms of progressing towards graduation."

Teachers told CNN they were devastated to learn recently that the homework they sent never made it to their student. An envelope filled with worksheets was returned to Aguilar's attorney, stamped "Return to sender. Refused." A handwritten note on the stamp said, "Unknown name" and "ID# required."

Without being able to keep up with his schoolwork while detained, Aguilar is behind in his classes, Brillante said. But teachers, she said, will do everything they can to help him get on track.

"When he gets back, he gets a clean slate," she said.

For students, the case has been an education unlike anything inside a textbook, the school's principal told reporters Tuesday.

"It is a wonderful lesson, I think, in civics for all of our students to learn about our systems, and even the broken parts of our system that need to be fixed," Principal Edith Johnson said. "And I know that this beautiful group of students that I lead in that school will be a part of mending a broken system."