By Scott Malone

BOSTON (Reuters) - A Massachusetts judge on Friday ordered parishioners of a Roman Catholic church who have occupied the building for more than a decade while the archdiocese attempted to close it to end their vigil by next week.

Parishioners of St. Frances Xavier Cabrini church in Scituate, Massachusetts, south of Boston, have maintained a 24-hour vigil at the church since the Archdiocese of Boston in 2004 identified it as one of 70 parishes to close in a restructuring.

Massachusetts Superior Court Justice Edward Leibensperger ordered the group to leave the church, located on a 30-acre (12-hectare) plot of land near the waterfront, by June 5, saying the remaining occupants have shown "a stubborn refusal to accept the reality of final decisions of the courts."

The group took the week's notice as breathing room and said it meant to continue its battle in the courts.

"We just found out this afternoon and so we're going to the court of appeals," said Maryellen Rogers, of The Friends of St. Frances X. Cabrini, in a phone interview. "We have to exhaust every level of appeal."

A spokesman for the Boston archdiocese declined to comment on the court's decision.

St. Frances is the last of a half-dozen churches in the Boston archdiocese that parishioners had occupied in an effort to prevent their shutdown. The other groups have since abandoned their efforts or lost in the courts.

The decision to shutter the parishes dates back to the years when a sex abuse scandal first rocked the U.S. Catholic Church, as investigations revealed church leaders had covered up charges priests had sexually assaulted minors. The scandal sparked dozens of lawsuits by abuse survivors, costing the church billions of dollars and driving some prominent dioceses into bankruptcy.

Even as the judge issued his order on Friday, the occupation continued, with parishioners taking it in turns to remain inside the church building. Margaret O'Brien, an 85-year-old parishioner, said she meant to stay.

"We're going to fight as long as we can," O'Brien said. "It's the right thing to do."

(Reporting by Scott Malone; Editing by Lisa Lambert)