Image caption The university expects to enrol its first class of law students in 2016

Canada's first faith-based law school has been approved over objections from gay-rights advocates and hundreds of law students.

Trinity Western University's code of conduct states students can be expelled if they have same-sex relationships.

Critics say the law school will produce lawyers with an anti-gay bias in a country with anti-discrimination laws and legal gay marriage.

The university has said it welcomes gay and lesbian students.

"We are thrilled with this news," university president Bob Kuhn said in a statement, adding "all students [gay or straight] are welcome to attend Trinity Western University, providing they meet our academic requirements and agree to respect our community values".

In a statement, British Columbia's minister of advanced education, Amrik Virk, said the university had proven that graduates "could meet the national standards to practice law".

The school reportedly plans to enrol its first class of law students in 2016.

A letter petition in March against approving TWU's law school attracted signatures from more than 1,000 students at Canadian law schools, the CBC reported.

Critics had specifically pointed to Trinity's Community Covenant Agreement, which says students should abstain from "sexual intimacy that violates the sacredness of marriage between a man and a woman".

The university "reserves the right to discipline, dismiss or refuse a student's re-admission" if the agreement is broken.