WASHINGTON — The Supreme Court agreed Wednesday to decide how much protection religious institutions have from lawsuits filed by employees who are fired.

It's the second religious freedom case the court will hear this term. It earlier agreed to consider a Montana law that barred religious schools from getting state scholarship aid funded by taxpayers.

The court ruled in 2012 that churches, the schools they run, and other religious organizations cannot be sued by employees who perform a "ministerial" function. To allow such suits, the court said, would cross the line separating church and state.

On Wednesday, the justices agreed to hear appeals from two Catholic schools in California that were sued when they decided not to renew teacher contracts. Agnes Morrissey-Berru sued Our Lady of Guadalupe School in Hermosa Beach for age discrimination when her contract was terminated. Kristen Biel sued St. James School in Torrance when her contract wasn't renewed. She said the school violated the Americans with Disabilities Act in her firing.

In both cases, the churches said they were immune. But the 9th Circuit Court of Appeals in San Francisco refused to throw out the lawsuits, ruling that while the teachers taught religious subjects, their duties were not ministerial. Morrissey-Berru is not a practicing Catholic and was not required to attend any religious training for most of the time she taught at Our Lady of Guadalupe.

She never led any religious services, never selected hymns at mass and never delivered a sermon. In no way, she argued, did she act as any kind of minister. Kristen Biel is Catholic, but her faith was not a requirement for teaching at the school. She, too, said she never performed any ministerial functions.

Lower courts have generally held that employees who perform any religious function cannot sue for job discrimination, whether they are considered ministers or not. If the appeals court rulings in these two cases are allowed to stand, lawyers for schools told the Supreme Court, it would open religious institutions to lawsuits that the high court's 2012 decision did not intend to permit.

"Getting it right is crucial in protecting church-state relations," they said in their written brief asking the court to take the cases.

The justices will hear courtroom argument in the spring and issue a decision by late June.