The government has set out plans to allow same-sex couples in England and Wales to marry, but it will be illegal for the Church of England and Church in Wales to offer same-sex marriages.

Culture Secretary Maria Miller told the Commons marriage would be extended to same-sex couples in a civil ceremony and religious organisations which wish to "opt in" to offering ceremonies.

Mrs Miller assured MPs a "quadruple lock" would be put in place to protect religious freedom and ensure religious institutions who do not want to conduct gay marriages will not face legal challenge.

She told MPs: "I believe these proposals strike the right balance between protecting important religious freedoms while ensuring that same-sex couples have the same freedom to marry as opposite-sex couples."

Shadow work and pensions minister Yvette Cooper welcomed the announcement.

She said the state should not stop people from getting married on the "grounds of gender" and urged the government not to be "too reserved" in promoting the changes.

The coalition's proposals for gay marriage have the backing of Labour and the Liberal Democrats but Conservative MPs remain deeply divided on the subject.

Stewart Jackson, the Conservative MP for Peterborough, described the proposals as a "constitutional outrage" for which there is "no electoral mandate".

Conservative former minster Cheryl Gillan said many of her constituents felt the government was "challenging their deeply held religious beliefs".

But Conservative MP Bernard Jenkin welcomed the plans telling MPs "we should afford the freedom to marry to every citizen in this country".

Liberal Democrat MP Stephen Gilbert believed the proposals struck the right balance between "protecting religious freedoms and extending legal equality to the LGBT [lesbian, gay, bisexual and transgender] community".

But Liberal Democrat MP Sir Alan Beith asked Mrs Miller to take note that "many" churches had a "genuine" fear of legal challenge, even if it is unsuccessful.

The government held a consultation on the subject earlier this year, proposing legislation to permit same-sex unions in civil ceremonies in a register office or approved premises.

But Conservative Edward Leigh said the consultation had not included religious marriage between same-sex couples, asking: "How can you legislate for something you haven't consulted on?"