Truro Church in Northern Virginia is among the seven congregations that would have to vacate their churches if they decide not to appeal. (Carol Guzy/The Washington Post)

A Virginia judge has ruled against seven conservative congregations that broke away from the Episcopal Church in 2006, rejecting their argument that they should be able to keep some $40 million in church real estate that the national denomination also claims.

The case has drawn worldwide attention because it involves a cluster of large, prominent churches with well-known conservative pastors and because the issues at hand — particularly the Episcopal Church’s acceptance of same-sex relationships as equal to heterosexual ones — are roiling much of organized religion. Various Protestant congregations in particular have wound up in litigation across the country.

The 113-page ruling was handed down Tuesday by Fairfax County Circuit Court Judge Randy Bellows.

A spokeswoman for the congregations said they were considering their next step, but a letter sent to some 4,600 congregants sounded as though they are bracing for the worst. Each congregation has a contingency plan if they have to vacate, said Caitlin Bozell Manaois.

“We will continue as a strong church family. We will move forward in Christ together with an invigorated sense of purpose as well. Of course we are disappointed, but we will not look back,” the Rev. John Yates, rector of The Falls Church in Falls Church, wrote in a letter to his congregation.

The congregations were among more than a dozen that voted in 2006 and 2007 to separate from the Episcopal Church, which is the official wing of the Anglican Communion in the United States. Members believe they — not the Episcopal Church — represent true Anglicanism, and switched their affiliation to the Anglican Church of Nigeria.

If they decide not to appeal, the congregations would have to vacate their churches, which include the historic The Falls Church and Truro Church in Northern Virginia.

During the 2006-07 votes, almost all the churches’ congregants sided with the conservatives. Just four, much smaller groups that did not want to leave the Episcopal Church remained together. They have been worshiping in basements and other temporary spaces during the litigation.

The ruling means, for example, that more than 2,000 worshipers affiliated with the Nigerian Church would move out of The Falls Church and an Episcopal congregation of fewer than 100 would come in.

Bellows was charged in this phase of the case with deciding whether the diocese or the congregants owned the property under Virginia real estate law. Evidence included questions about who paid for the property, who maintained it and whose names were on the deeds.

According to a news release from the Diocese of Virginia, one of the largest Episcopal dioceses in the country, Bellows ruled that the national denomination and the diocese have “a contractual and proprietary interest” in each of the properties subject to the litigation. The court ordered that all property subject to its ruling be turned over to the Diocese, the release said.

“Our goal throughout this litigation has been to return faithful Episcopalians to their church homes and Episcopal properties to the mission of the Church,” the Rt. Rev. Shannon S. Johnston, Episcopal bishop of Virginia, said in a statement late Tuesday night.