Updated

Two Pennsylvania Catholic dioceses have won a delay in having to comply with what they argue are controversial mandates in ObamaCare that would go against their religious values.

A federal judge ruled Thursday that forcing two Catholic schools and charities related to the schools to comply with parts of the Affordable Care Act could result in a loss of donations and workers, and fines that would force some of the church programs to shut down.

The ruling by U.S. District Judge Arthur J. Schwab for the Pittsburgh and Erie Catholic dioceses buys the two groups time to appeal their case to higher courts. The dioceses objected to the law's requirement that contraception, including sterilization, be offered in employee health care plans.

Schwab said the government won't be harmed by a delay in the case but that the dioceses would be harmed and would face a "substantial burden on their free exercise of religion" if they were forced to comply by Jan 1.

Schwab noted that the contraceptive mandate would apply to some church organizations but not others, and that would cause a division for the church.

Both sides expect the case to be appealed to higher courts.

There have been 75 similar lawsuits filed against the government over ObamaCare, setting the stage, some say, for a final showdown at the U.S. Supreme Court.

The public policy arm of the Catholic Church in Michigan filed a Nov. 1 lawsuit in federal court. They, too, are challenging the federal mandate to provide contraception services under ObamaCare.

In the Pennsylvania case, the Department of Justice claimed that a plan to have third parties provide and pay for services such as birth control and abortion wouldn't infringe on religious freedom rights.

But Pittsburgh Bishop David Zubik testified before Schwab last week that he wouldn't be able to live with himself if he signed a form that allowed the disputed services to be provided to employees, even by a third party. Zubik said the church is being asked to violate an important belief and a matter of conscience.

The Associated Press contributed to this report.