DAVID Cameron has quit parliament, with reports suggesting he’d rather resign than rebel against Theresa May’s grammar school plans.

The former Prime Minister announced his intention to leave the Tory backbenches yesterday catching colleagues off-guard. Although he had announced his intention to resign the day after Britain voted to leave the EU, key allies had suggested he would support the government from the back benches.

He himself had assured supporters that he would be fighting for his seat in the 2020 election.

Announcing his resignation in an interview with ITV, Cameron said he didn’t want to be a “distraction” from May’s government.

“I have thought about this long and hard over the summer and I have decided the right thing to do is to stand down as the member of parliament for Witney. There will be a by-election. I will give the Conservative candidate my full support.”

Cameron said he fully supported May, saying she had “got off to a cracking start.”

Alluding to his differences of opinion over grammar schools, Cameron added: “Obviously I am going to have my own views about different issues. People would know that. And that is really the point.

"As a former Prime Minister, it is very difficult, I think, to sit as a backbencher and not be an enormous diversion and distraction from what the government is doing. I don’t want to be that distraction.”

May, who spoke to Cameron by phone yesterday morning, said: “I was proud to serve in David Cameron’s government and under his leadership we achieved great things. Not just stabilising the economy but also making great strides in delivering serious social reform. His commitment to leading a one nation government is one that I will continue. I thank him for everything he has done for the Conservative party and the country and I wish him and his family well for the future.”

His resignation frees up one of the safest Tory seats in the country. The only time Witney in Oxfordshire has been anything other than

Conservative was when Tory MP Shaun Woodward defected to Labour in 1999.

Rumours that Ruth Davidson may throw her hat into the ring were quashed almost immediately by her office. “That won’t be happening – Ruth is entirely focused on being a strong opposition to the SNP in Scotland,” a spokesman said. Ladbrokes was offering odds of 16/1 on her being selected.

The Scottish Tory leader tweeted: “Sorry to see David Cameron standing down. He transformed the party & country. Parliament benefits from experience of office on backbenches.”

Cameron was forced to leave Downing Street in July, two months earlier than planned, after Theresa May took the party’s top job without a leadership contest.

His predecessor William Hague tweeted: “Right decision by David Cameron to leave Commons – former Prime Ministers are either accused of doing too little or being a distraction.”

Former friend turned enemy Lord Ashcroft tweeted: “Sooner or later David Cameron will emerge as Lord Cameron and rightly so....”

It was Ashcroft who was responsible for one of the most bizarre moments in Cameron’s premiership, when he alleged in a biography that Cameron had put his genitals in the mouth of a dead pig during a university club ritual.

Cameron denied the story, and Ashcroft and co-author Isabel Oakeshott admitted they only had one source, a Tory MP whom she accepted “could have been slightly deranged”

Last week May announced plans to introduce new grammar schools in England and Wales, which she claimed would the country “the great meritocracy of the world”.

In Parliament yesterday Education Secretary Justine Greening set out the government’s plans to introduce selective schools, saying that the best institutions should not be those in areas with high house prices.

Under the plans, grammars will have to reserve a proportion of their places for pupils from less advantaged backgrounds.

Cameron once said bringing back grammar schools “has always been wrong and I never supported it”.

A friend and close confidante of the ex-PM told The Sun: “Of course he would struggle to vote to bring back grammar schools, and his positive views about the EU are also well known.

“That all creates problems which he doesn’t want to create. The more he thought about it over the summer, the more he saw this and decided he needed to go.”

Analysis: David Cameron exits the Commons ... leaving chaos in his wake