Katy Perry is now clear to buy a Catholic convent after a Los Angeles judge on Wednesday invalidated an earlier deal brokered between an order of nuns and a local businesswoman.

The Roman Catholic Archbishop of Los Angeles had argued in court that only archdiocese had the right to sell the property, a position Superior Court Judge Stephanie Bowick Perry agreed with.

Perry was pulled into the legal battle last year when the nuns of the Institute for the Sisters of the Most Holy and Immaculate Heart of the Blessed Virgin Mary tried to sell the aging 8-acre property to local restaurateur Dana Hollister for $15.5 million.

The two remaining nuns of the sisterhood — who are now living offsite — had maintained their right to sell, pointing to the fact that the property was bequeathed to them more than 40 years ago by a devout parishioner.

The archdiocese, however, argued that only the Church had the right to sell the 1927 estate, which is nestled in the Los Feliz neighborhood near Hollywood. The archbishop also argued that Hollister lacked the financial resources to go through with the purchase, and instead wanted to sell to Perry for $14.5 million.

Ultimately, the judge on Wednesday voided the earlier sisterhood-Hollister agreement that set off the legal battle, finding that archdiocese holds title and right to sell.

Perry's attorney, Eric Rowen, told BuzzFeed News they were "very pleased" with the outcome, which clears the way for the "Roar" singer to buy the property.

ADVERTISEMENT

Nick Ut / AP

The Sisters of the Immaculate Heart of Mary property.

John Scholnick, the attorney who represents the two nuns, told BuzzFeed News they were "of course disappointed with the decision."

The sisters, he added, had not decided whether to appeal the decision.

"All of our options are open," he said. "As far was we are concerned this is a long way from being done."

The archdiocese released a statement after ruling saying the care and well-being of all five of the remaining sisters had always been the primary concern.

The archdiocese was forced to take legal action to protect all the five sisters from being taken advantage of by the Dana Hollister transaction in which Hollister improperly took possession of their property for only $44,000 in cash and a contingent promissory note.The Institute continues to be under contract to sell the property to Katy Perry.The archdiocese will continue to provide pastoral outreach and care to the sisters. We will take any necessary steps to continue to protect the sisters and ensure that any transaction on the sale of the property will provide them with immediate funding for their care.

Throughout the legal wrangling, residents had mostly taken Perry's side, saying they feared Hollister — who has a track record of redeveloping properties — would do just that and degrade the neighborhood's charm.

Hollister, for her part, insisted she was undecided on her plans for the convent. Her attorney could not immediately be reached.