SCOTCH PLAINS — A week of emotional ups and downs ended on a high for a 12-year-old girl after a court ruled that her Catholic school must allow her to return to class next week.

The small and possibly temporary victory comes after school officials, flanked by a number of police officers, threatened to have the family arrested on Thursday, her father says.

Sydney Phillips, a basketball player whose family sued because she was not allowed to play with the St. Theresa School's boys basketball team after the girls team was disbanded, was working out with the New York Liberty of the WNBA when her family got the news that the school had requested them to pull their daughters.

The next day, police met Sydney and her younger sister Kaitlyn at the door of St. Theresa's in Kenilworth on Thursday, according to her father Scott Phillips. But by Friday an appeals court ruled that the school must allow them back to class pending a court hearing.

The expulsion came after a court rejected the family's lawsuit.

"When my wife called me I was taking Sydney up to Pennsylvania just to get away from everything. It was kind of depressing around the house. It finally hit her that she was expelled from school. It was pretty tough," Scott Phillips said.

But the mood change when a Superior Court judge signed an order regarding the expulsion.

"My wife started screaming and (Sydney) picks up the phone and starts screaming, 'We're going back to school! We're going back to school!'  I get goosebumps just thinking about it. It was so nice to hear."

The Archdiocese of Newark abruptly expelled the girls after citing a clause in the school's Parent-Student Handbook that states that "if a parent implicates St. Theresa School in a legal matter, or names St. Theresa School as a defendant in a civil matter, the parent/guardian will be requested to remove their children immediately from the school." A spokesman for the Archdiocese said Scott Phillips agreed in writing to the terms of the Handbook on Aug. 30, 2016.

Scott Phillips said it was an "ugly sight" when he arrived at St. Theresa's on Thursday with Sydney and Kaitlyn. Three police officers and three priests blocked the door.

"I walked up and handed them the letter from the Archdiocese. The letter said 'we request that you remove your children.' OK, well, the request is denied," Scott Phillips said he told Deacon Joe Caporaso, the school's principal.

The group went into the school for a meeting that lasted at least a half hour, according to Scott Phillips, who said he then left his daughters at the school so that he could drop off his son at his other school.

On his way back, his wife said officials told threatened the family with arrest if they didn't leave the school. Phillips said two more police officers came to the school and Kaitlyn was "crying hysterically."

"This is what it comes down to, Father Joe? Twenty years of friendship I've know you? I was a policeman and I used to drive him to sick calls at midnight. I know him. You expelled my daughters? They're honor roll girls. They're role models. What did they ever do?" Phillips said he told the pastor. "He wouldn't answer. He wouldn't even look at me. He started to walk away and I said 'Father Joe, I want you to look at something'." Phillips said he moved Caitlyn in front of him and said, 'this is all on you."

Sydney Phillips currently plays for Immaculate Heart of Mary Church in Scotch Plains.

"It's not like she doesn't have a place to play. She just wanted to play for her school. She's been there since pre-K. They have a basketball program, the girls team folded. Let her go play with the boys. It's a CYO league. No one gets cut. Everyone plays," he said, adding that she is better than the boys but would not be displacing anyone on the team.

Scott Phillips said he has heard through his daughter's conversations with friends at school that the teachers are "really really upset" and expects they will welcome her back with open arms on Monday.

Newark Archdiocese spokesman James Goodness declined comment after the appeal was announced. “We are aware of a stay of the expulsion. We will not comment on the status of the legal proceedings.”

Contact reporter Dan Alexander at Dan.Alexander@townsquaremedia.com.

More from New Jersey 101.5: