David Cameron has warned that any attempt to row back on gay marriage is destined to fail after Tory leadership contender Andrea Leadsom said she "didn't really like" the legislation.
The Prime Minister said he was "extremely proud" of having introduced same-sex marriage in the last parliament - despite opposition of many grassroots Tories - and that it now had the support of an "enormous" majority of MPs.
His comments will be seen as a slap-down for Ms Leadsom who has said that, while she now supports gay marriage, she abstained in the Commons vote and would have preferred to see civil partnerships extended to heterosexual couples and marriage kept as a Christian service for men and women.
Mr Cameron, who is attending the Nato summit in Warsaw, said he would not be taking sides in the leadership contest, but he made clear that there could be no going back on the legislation.
"On equal marriage, I am extremely proud of it. So many people have taken advantage of it. I think there is now an enormous parliamentary majority for equal marriage and so I am confident that it will continue to be the case," he said.
"It is also being copied all over the world. Britain was one of the countries with a centre right leaning government to take that step and many others are following suit and I am very proud of that."
The Prime Minister strongly denied he was clinging to office after some Tory MPs called for the final vote of party members - which is due to see the result announced on September 9 - to be brought forward.
Some reports have suggested it was delayed so that he could attend a final G20 summit in China just days before handing over the reins of power. However, Mr Cameron insisted the leadership election was a matter for the Conservative Party Board.
"I will do as the party and the country commands. The board set the date for September 9, but it is up to them. I will serve for as long or as short as necessary. If I have to attend the G20, I will - but if I don't have to I won't," he said.
Mr Cameron said he intended to carry on as a backbench MP after he leaves No 10, but refused to be drawn further on his future plans.
"It is my intention to continue serving as a Member of Parliament, helping to represent the interests of the people of West Oxfordshire. Anything else I do will come a bit later," he said.