A Los Angeles judge has once again paved the way for Katy Perry to buy her dream home — a nun's convent.

Judge Stephanie Bowick ruled Wednesday that the California Institute of the Sisters, controlled by the Roman Catholic Archbishop of Los Angeles, has clear title to the property and so is free to complete the sale to Perry, who had been competing with local restaurateur Dana Hollister.

The Roman Catholic Archbishop of Los Angeles had been locked in a legal battle with the convent’s order of nuns over who had the right to sell the 8-acre property. The archdiocese had argued that only it had the right to sell the property, a position Bowick agreed with in April and again in her new ruling issued Tuesday.

Nick Ut / AP

The Sisters of the Immaculate Heart of Mary property.

The April ruling was vacated in September to give Hollister and the nuns an opportunity to further develop their legal case.

Perry has been trying to buy the property since 2015, when she was pulled into the legal battle after 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 property to 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.

The court ultimately ruled that the institute is under the direct supervision of the pope and, pursuant to a papal decree, the archbishop remains in control, not the nuns.

Attorneys for Perry and for the nuns did not immediately respond to requests for comment.