A private religious high school can expel students it believes are lesbians because the school isn't covered by California civil rights laws, a state appeals court has ruled.

Relying on a 1998 state Supreme Court ruling that allowed the Boy Scouts to exclude gays and atheists, the Fourth District Court of Appeal in San Bernardino said California Lutheran High School is a social organization entitled to follow its own principles, not a business subject to state anti-discrimination laws.

"The whole purpose of sending one's child to a religious school is to ensure that he or she learns even secular subjects within a religious framework," Justice Betty Richli said in the 3-0 ruling, issued Monday.

As with the Boy Scouts, she said, the primary function of the school is to instill its values in young people, who are told of its policies when they enroll.

Kirk Hanson, a lawyer for the two girls, said he was disappointed and would talk to them about a possible appeal to the state Supreme Court.

According to the court, he said, "if you're a religious school, you can discriminate on any basis you want."

He also noted that all children must attend school, either public or private, and said schools serve different purposes from a voluntary organization like the Boy Scouts.

John McKay, a lawyer for California Lutheran, said he was pleased the court recognized that "a religious school is not a business, and the purpose of a religious school is to teach Christian values."

Any state law that required the school to admit gays or lesbians would violate the school's freedom of expression and religion, McKay said.

The ruling is the first to consider a religious school's status under California's Unruh Civil Rights Act, which forbids discrimination by businesses and was amended in 2005 to include discrimination based on sexual orientation. State education law also forbids anti-gay bias, but that law applies only to public schools.

The girls were juniors at the high school in Wildomar (Riverside County) when the principal, Gregory Bork, summoned them to his office in September 2005 and questioned them separately about their sexual orientation and whether they loved each other. The principal acted after another student reported postings on the girls' MySpace pages.

Bork suspended the girls based on their answers, and the school's directors expelled them a month later.

The girls, who later graduated from another high school, have not been identified and have not discussed their sexual orientation, Hanson said. Their suit said the school had no right to dismiss them because of its perception that they were lesbians.

The court acknowledged that past rulings have interpreted the Unruh Act's definition of businesses broadly, to include a Boys' Club, the Rotary Club and a private golf club that let the public use its facilities.

But the school differs from those institutions, the court said, because the main reason for its existence is the religious message it seeks to instill in its students.