She should prepare a “Firework" to celebrate — singer Katy Perry is one step closer to living in a Los Angeles Catholic convent she’s been fighting to buy for two years.

A Los Angeles Superior Court this week sided with the pop singer and the Los Angeles Archdiocese in a case that legally pitted the archdiocese against its own elderly nuns and wealthy developer Dana Hollister — and even involved the pope.

The ruling marks the near end for the two-year legal battle, in which the nuns tried to block the archdiocese from selling Perry their convent in favor of the real estate developer.

"The court finds that the sisters did not have authority to sell the property to [Ms.] Hollister,” said Judge Stephanie Bowick in a summary judgment issued Tuesday and obtained by Mansion Global.

Judge Bowick canceled the sale to Ms. Hollister, paving the way for Perry to finally purchase the Los Feliz nunnery through her limited liability company, The Bird Nest LLC, as was the plan two years ago.

A lawyer representing Ms. Perry did not return a request for comment.

Perry, 32, first agreed to buy the large religious compound for $14.5 million in 2015 from the archdiocese, presumably to turn it into a sprawling private estate. But before the singer could go into escrow, two nuns from the Sisters of the Most Holy and Immaculate Heart of the Blessed Virgin Mary scrambled to seal a deal with Hollister instead, according to court documents.

“The property would have sold to [Katy Perry], so that’s why we closed,” Hollister said in a deposition quoted in Tuesday’s ruling.

In their rush, the nuns failed to get the necessary written approval for the sale from the L.A. Archdiocese as well as the pope, the judge ruled.

“No consent was obtained before the close of the sale,” Judge Bowick wrote in the ruling. “The above failures render the Hollister transaction invalid.”

The archdiocese said the ruling, though not in the nuns’ favor, ultimately benefits the sisters because the sale to Hollister was not ideal. The nuns have not lived on the property since 2011.

“The main concern of the Archdiocese is and has always been the care and well-being of all the IHM Sisters,” the archdiocese said in a statement this week.

The developer paid the sisters $44,000 and signed a contingent promissory note for the rest “without any guarantee that the sisters would ever receive any additional payment,” the archdiocese said. The promissory note amounted to more than $9 million, according to property records.

Ownership of the convent returns to the nuns’ order until the archdiocese agrees to a buyer.

If Perry gets her way, she’ll eventually move into the eight-acre property on Waverly Drive, which consists of multiple buildings, including a church. Images of the property show an amenity- and architecturally rich estate. The salmon-colored Spanish-style compound surrounds a central courtyard with a pool. There’s also an attractive garden terrace and fountains.

Property records indicate the main living quarters were built in 1930 and expanded in 1985. The 20,000-square-foot structure has 25 bedrooms and 29 bathrooms, according to records on PropertyShark — plenty of room for Perry to “Roar” or live out her “Teenage Dream.”

Lawyers for Hollister and the nuns involved in the case were not immediately available for comment.