The British government announced Tuesday that it will introduce a bill next year legalizing gay marriage — but banning the Church of England from conducting same-sex ceremonies.

Equalities minister Maria Miller said the legislation would authorize same-sex civil marriages, as well as religious ceremonies if religions decide to “opt in.”