TORONTO -- An Ontario court has upheld the Ontario law society's refusal to accredit a B.C. Christian university's yet-to-open law school.

Trinity Western University had asked the Divisional Court in Ontario for a judicial review of the Law Society of Upper Canada's decision, but the court dismissed the application Thursday.

The university's covenant forbids sexual intimacy outside heterosexual marriage, which has led to similar legal battles for the university in other provinces.

The cases pit religious freedoms against same-sex equality rights, with each side saying one is discriminating against the other.

Three judges wrote that the law society's decision to deny accreditation carefully weighed the school's right to freedom of religion versus the students' rights to equal opportunity.

The university can still open a law school, but its graduates wouldn't be eligible to be called to the bar in Ontario.

Trinity Western has not yet said if it will appeal the decision.