A plan to sell Crystal Cathedral, a California mega-church known for its Hour of Power broadcasts, to a Roman Catholic diocese for $57.5 million was approved on Thursday by a U.S. bankruptcy judge.

Losing out in a bankruptcy bidding war for the towering 31-year-old church, famed for its 10,000 panes of glass, was a Protestant-affiliated university that offered more money but whose proposal was deemed less favorable for other reasons.

U.S. District Judge Robert Kwan ultimately ruled that the diocese had the best plan for paying off the ministry's entire projected debt, including an annual annuity of roughly $300,000 for its founder, retired televangelist Robert Schuller.

Announcement of the decision capped 14 hours of hearings spanning two days.

Located in the Orange County city of Garden Grove, about 30 miles southeast of Los Angeles, the ministry filed for Chapter 11 protection in October after falling $50 million in debt.

The Roman Catholic Diocese of Orange envisions eventually using the cathedral as a new place of worship for its 1.2 million congregants, but would give the existing Protestant congregation three years to move, court papers said.

Schuller's daughter, Carol Milner, told Reuters the diocese provided the best bid because it would allow for religious services to continue at the site indefinitely, even if it meant the current congregation would have to relocate.

I don't think it's quite hit me, Milner said in tears, after the ruling. I'm relieved to know that for decades and centuries the sanctuary will be a sacred place, a place where I can pray and sit down on a bench.

Chapman University, whose proposal initially was considered the preferred bid, had offered to lease back the property to the Crystal Cathedral ministry for 20 years. But Milner said she learned that the school planned in the long run to convert the landmark building into a theater.

Moreover, Milner said, Crystal Cathedral ministry bylaws required any potential buyer of the site to be a religious institution, a stumbling block for Chapman despite its affiliation with the Disciples of Christ denomination.

The bankruptcy marked a sharp blow to a congregation that got its start in 1955 when Schuller and his wife, Arvella, began holding services in a rented drive-in theater.

Schuller went on to become an internationally known televangelist through his Hour of Power broadcasts before retiring as senior pastor in 2006.

Testimony during the bankruptcy court proceeding revealed that 70 percent of the church's revenue comes from those Hour of Power broadcasts, which continue.

The judge said he expects the sale to be finalized by the end of the year.

Bishop Tod Brown of the Diocese of Orange attended Thursday's court hearing and called the outcome bittersweet.

I have the deepest regret and sympathy for the Crystal Cathedral that they had to take this legal action, he said.

Crystal Cathedral's senior pastor, Sheila Schuller Coleman, who now heads the congregation, said that even though her church's board decided to accept the diocese's offer, she still holds out hope for a miracle to keep the cathedral.

If it's God's will for us to move, we believe it will be where He needs us most, she said in a statement. It does not mean that our ministry will be diminished.