(CNN) -- A judge has bounced a top-ranked Florida high school basketball team from the playoffs, providing a victory to the statewide athletic association that ruled a foreign-born player was ineligible.
Last week, a circuit court judge ruled that Dr. Michael M. Krop Senior High School in Miami should be allowed to play while the Florida High School Athletic Association investigated.
But a judge with the 3rd District Court of Appeal ruled Wednesday that the temporary injunction should not have been granted to the three players on the Lightning who sought it.
Chief Judge Juan Ramirez Jr.'s decision means Krop Senior High, which was to play Thursday night after two previous wins, is out, pending any possible successful appeal. Miami Senior High School will now get a first-round bye in the 6A bracket, the athletic association said in a statement.
Ramirez wrote that courts should intervene "only in exceptional circumstances that have not been shown here." The athletic association has the authority to enforce its rules, he said.
CNN left messages Thursday with the Krop administration.
"This is a good day for coaches and student-athletes who play by the rules," athletic association Executive Director Roger Dearing said in the statement Thursday. "Doing what's right pays off."
"The association now expects the principal, athletic director, coaches and student-athletes at Dr. Krop to abide by all rules and procedures regarding the FHSAA," Dearing said. "The same can be said of all 674 member high schools in the state of Florida."
At issue is the eligibility of guard Brian Delancy, 19, who was born in the Bahamas.
The board of the athletic association, which said Krop Senior High did not file proper paperwork on Delancy's eligibility and immigration status, had ruled he was ineligible and that the top-ranked team must forfeit the 19 games it won when the senior guard played.
Federal law prohibits school districts from asking about a student's immigration status. The Florida athletic association does require information on players' eligibility and residency.
The association keeps such records so that "there is a fair and equitable playing field for all student athletes" and to discourage recruiting, said association spokesman Seth Polansky. Where athletes come from "is not an issue," he said. "It is the paperwork."
Dearing said last week that Krop Senior High did not file current papers on Delancy's status even though it had received training on how to do so. Attorneys for the player argued the school wasn't required to file them.
Delancy's attorneys also argued the athletic association never set a hearing or requested information from the athlete before making a "unilateral" determination on his eligibility. Dearing said the association followed its rules.
CNN's Anna Rhett Miller and Phil Gast contributed to this report.