David Cameron has said that MPs will not support any attempt to repeal his flagship gay marriage legislation, the day after Conservative leadership contender Andrea Leadsom said she was not happy with the measure.

Speaking on his way to a Nato summit in Poland, the outgoing prime minister said he was “extremely proud” of the legislation and highlighted the huge backing it continues to enjoy among MPs and in the country.

He made the comments after Leadsom spoke on Thursday of the “very clear hurt” that the law had caused to Christians, which is why she opposed it even though she believes that love between same-sex couples is worth the same as that between heterosexual couples.

“I would have preferred civil partnership to be available to heterosexual and gay couples and for marriage to have remained as a Christian service for men and women who wanted to commit in the eyes of God,” she told ITV.

Asked if he would be disappointed by any attempt by his successor to repeal the legislation, Cameron said: “On equal marriage, I’m extremely proud of it and so many people have taken advantage of it.

“I think there’s now an enormous parliamentary majority for equal marriage so I’m confident that it will continue to be the case.

“It’s also very popular all over the world. Britain was one of the first countries with a centre-right leaning government to take that step and many others are following suit and I’m very proud of that.”

Cameron’s remarks are likely to be interpreted as a warning shot to his successors not to undo his legacy on equality legislation.

However, he declined to get involved in backing either Theresa May, the home secretary, or Leadsom, a junior energy minister, for the job of prime minister.

“I did not vote, I will not speak, I will not play any part and I will support the decision of my colleagues in the party whoever they choose,” he said.

The prime minister is to step down on 9 September, after attending the G20 summit in China with outgoing US president Barack Obama.

There has been speculation that the Conservative leadership contest has been lengthened to last over the summer to allow him this final farewell on the international stage. But Cameron insisted he was open to a shorter contest and it was “absolutely not true” that he was clinging on to No 10.

“I will do as the party and the country commands,” he said. “The board set the date for September 9 and it’s for them.

“I will serve for as long or as short as is necessary. But certainly if I have to attend the G20 I will, but if I don’t have to, I won’t.”

Former Tory chairman Grant Shapps has written to the party with the backing of around 40 MPs, demanding a new prime minister sooner to help end uncertainty facing the country.

However, the Conservative party has now rejected the Shapps proposal, saying the timetable was not going to change.

During the first outing of his official prime ministerial plane on Friday, Cameron was also pressed about his plans for life after Downing Street, including whether he would take another cabinet job or leave to make money in business like former prime minister Tony Blair. He left the door open to all options.

“It’s my intention to continue serving as an MP and helping represent the interests of the people of west Oxfordshire and anything else I do will come a bit later,” he said.

Cameron’s intervention came as May signed a “clean campaign pledge” and challenged Leadsom to do the same.

May said: “The public are tired of people acting like politics is a game, so a clean campaign is what our party and the country deserve. Today, I am signing a clean campaign pledge, and I hope Andrea will do the same.”

The pledge involves: not cooperating with other parties or their supporters; sticking to the £135,000 spending limit; keeping social media campaigning clean; keeping campaigning within “acceptable limits of political debate”, and doing what is right for the country and the party.

With just two months left before Cameron leaves Downing Street, the prime minister used the Warsaw Nato summit to reassure other world leaders that the UK would continue to spend 2% of its national income on defence at least until 2020.

He also made an intervention on the subject of EU citizens living in the UK, which has been a point of contention between Leadsom and May.

Leadsom has guaranteed their right to stay and May has said this cannot not be assured given the uncertain position of British citizens living in other EU countries. She has also suggested that she may want to deport EU citizens who have committed certain crimes, while claiming that Leadsom would allow them to stay.

In a meeting with the Polish prime minister, Beata Szydło, on Friday, Cameron said it was the expectation that the legal rights of Poles in the UK would be protected, although he did not receive a similar assurance about the rights of British people in Poland. His official spokesman said this did not amount to “putting pressure on his successor” to guarantee that EU citizens could stay in the UK.

Cameron went on to condemn the string of “race hate crimes in the wake of the decision to leave the Europe”, which have included attacks on Britain’s Polish community.



