Updated

A Florida judge ruled Wednesday to allow a winning high school basketball team to compete in the playoffs after the school's athletic association tried to declare its star player ineligible because of his immigration status, wsvn.com reports.

Miami-Dade Circuit Court Judge Spencer Eig gave Dr. Michael M. Krop Senior High's basketball team a temporary injunction to allow the team compete in the upcoming district championships.

The Florida High School Athletic Association had ruled that the team's star player, Bahamas native Bryan Delancy, was ineligible to play because he didn't have the right paperwork to play interscholastic basketball. The ruling would have forced the team to forfeit the 19 games he played in, squashing their chance at competing in the playoffs.

Delancy, 19, who is in the U.S. on a student visa, has the constitutional right to go to school but not to play interscholastic sports, the association had said.

But Eig said Wednesday that it would be "fundamentally unfair not to let these kids play basketball," the station reports.

"I think what's done here is right and I'm very happy and relived that I can play and so can my teammates," Delancy said after the judge's ruling.

The FHSAA requires schools to file paperwork for all international students who wish to participate in extra-curricular activities. Florida public schools cannot deny foreign-born students an education, but extracurricular activities are not considered a "right" for those students.

No paperwork was ever filed for Delancy, and he and two of his teammates are suing the FHSAA, arguing that the constitutional right to an education should include sports, according to the Miami Herald.

The championship games are set to begin tomorrow, and the team will be allowed to play in all of them.

Eig ruled that the FHSAA is permitted to continue its investigation. The association is allowed to go back and decide if Delancy is ineligible, wsvn.com reports.

Click to read more from wsvn.com