HILLSBOROUGH COUNTY, Fla. — A Hillsborough County school that had its charter terminated on Tuesday will have to close its doors, at least for now.

In a hearing Friday afternoon, a judge ruled in favor of the school district, which filed an emergency motion Thursday connected to Walton Academy of the Performing Arts.

In the court filing, school district attorneys pointed to serious safety concerns at the school.

On Tuesday, school board members voted unanimously to terminate the school’s charter. Attorneys said the school was supposed to close based on Florida statutes.

But the school opened anyway on Wednesday and Thursday.

Friday’s hearing was filled with witnesses and testimony from the school’s director and school security officials. But district attorneys argued that the law was simple — that the school has to close when a charter is terminated.

The hearing lasted for close to three hours before the judge ruled shortly before 5 p.m.

There are 113 students enrolled at the school, which has been around for 20 years.

The judge’s ruling takes effect immediately, so there will be no school on Monday.

There will be a hearing next month to appeal the school board’s decision to terminate the charter. That hearing will determine whether the closure is temporary or permanent.

Jason Margolin, attorney for the Hillsborough County school district, said: “In this statutory subsection permits an immediate termination of a charter when there’s an immediate and serious concern for student safety. To be clear, the statute does not require to be given any chance to cure deficiency, and it does not require any interval of time before termination.”

An attorney for Walton Academy, John Leombruno, said: “So what we have here is essentially the district coming in, pointing to the rules and saying, ‘Look, we don’t think you’ve complied enough. We’ve made the decision to terminate your charter. You have to get out, and we’re entitled to emergency relief.'”