(CNN) From world leader to the wilderness in just under three months.

David Cameron, the former British Prime Minister, has announced he will stand down as a member of Parliament for his constituency of Witney immediately, triggering a by-election.

Cameron, who has served in Parliament since 2001, stepped down as Prime Minister in the aftermath of June's Brexit vote i n which the UK decided to leave the European Union.

He had previously said that he was "keen to continue" in his role as a backbench MP after stepping away from Downing Street but has since decided such a role is untenable.

The Camerons walk back into 10 Downing Street after David Cameron announces his resignation following the UK's decision to leave the European Union on June 23.

The Camerons walk back into 10 Downing Street after David Cameron announces his resignation following the UK's decision to leave the European Union on June 23.

Cameron attends a remembrance service for Labour MP Jo Cox, who was murdered in her constituency in June.

Cameron attends a remembrance service for Labour MP Jo Cox, who was murdered in her constituency in June.

Cameron tries to get the youth vote in April 2016, ahead of the referendum on the UK's membership of the European Union.

Cameron tries to get the youth vote in April 2016, ahead of the referendum on the UK's membership of the European Union.

Cameron puts on a pair of wellington boots after severe flooding hit large parts of northern England in December 2015.

Cameron puts on a pair of wellington boots after severe flooding hit large parts of northern England in December 2015.

The Prime Minister talks with Theresa May during the state visit of China's Xi Jinping in October 2015.

The Prime Minister talks with Theresa May during the state visit of China's Xi Jinping in October 2015.

Cameron is captured on camera eating a hot dog with a knife and fork during the 2015 general election campaign.

Cameron is captured on camera eating a hot dog with a knife and fork during the 2015 general election campaign.

Cameron bows as he greets Queen Elizabeth II during the Mexican President's state visit on March 3, 2015.

Cameron bows as he greets Queen Elizabeth II during the Mexican President's state visit on March 3, 2015.

Cameron speaks at a memorial service for Sir Winston Churchill in January 2015, commemorating the 50th Anniversary of his state funeral.

Cameron speaks at a memorial service for Sir Winston Churchill in January 2015, commemorating the 50th Anniversary of his state funeral.

Cameron urges Scotland not to vote to leave the UK during a pre-referendum speech in Aberdeen ahead of the 2014 vote.

Cameron urges Scotland not to vote to leave the UK during a pre-referendum speech in Aberdeen ahead of the 2014 vote.

Cameron stands beside the then London Mayor Boris Johnson as the Olympic cauldron is lit for the Paralympic Games on August 24, 2012 in London.

Cameron stands beside the then London Mayor Boris Johnson as the Olympic cauldron is lit for the Paralympic Games on August 24, 2012 in London.

Cameron and his wife Samantha wave on the steps of Downing Street on May 11, 2010 after he took office.

Cameron and his wife Samantha wave on the steps of Downing Street on May 11, 2010 after he took office.

Cameron was a fresh-faced candidate for leadership of the Conservative Party when he beat David Davis, Liam Fox and Kenneth Clarke to the post in October 2005.

Cameron was a fresh-faced candidate for leadership of the Conservative Party when he beat David Davis, Liam Fox and Kenneth Clarke to the post in October 2005.

David Cameron's time as British prime minister is coming to a close as he hands over the reins to Theresa May.

David Cameron's time as British prime minister is coming to a close as he hands over the reins to Theresa May.

"In my view, the circumstances of my resignation as Prime Minister and the realities of modern politics make it very difficult to continue on the backbenches without the risk of becoming a diversion to the important decisions that lie ahead for my successor in Downing Street and the Government," he said in a statement Monday.

"I fully support Theresa May and have every confidence that Britain will thrive under her strong leadership.

"I now look forward to a life outside of Westminster, but hope to continue to play a part in public service and to make a real and useful contribution to the country I love."

We came into Parliament together, had a great partnership + I will miss him alongside me on the green benches over the coming years. Sad day — George Osborne (@George_Osborne) September 12, 2016

Cameron, 49, became Conservative leader in 2005 and Prime Minister in 2010.

He said he had conferred with his successor before making his decision public.

JUST WATCHED Well, that was quick! U.K. has a new Prime Minister Replay More Videos ... MUST WATCH Well, that was quick! U.K. has a new Prime Minister 02:20

"I spoke to Theresa May and she was very understanding about this decision," Cameron told ITV.

"I support her. I support what she's doing. She's got off to a cracking start. Obviously I'm going to have my own views about different issues; people would know that. And that's 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. I want Witney to have an MP that can play a full role in parliamentary and political life in a way that I think I would find very difficult, if not impossible."

Right decision by David Cameron to leave Commons - former Prime Ministers are either accused of doing too little or being a distraction. — William Hague (@WilliamJHague) September 12, 2016

Under Cameron's leadership, the Conservatives won the 2010 general election, ending Labour's 13 years in government, although the party was forced into entering a coalition government with the Liberal Democrats.

During his time as Prime Minister, he introduced same-sex marriage in 2013 and held off the threat of Scottish independence after a referendum in 2014.

JUST WATCHED David Cameron says goodbye Replay More Videos ... MUST WATCH David Cameron says goodbye 01:41

In the end, Cameron's undoing was his belief that he could end the constant infighting within the Conservative Party over the UK's position in Europe.

His decision to call a referendum proved an unnecessary and costly gamble.

He attempted to use the economy to persuade voters that remaining in Europe would be best for Britain. But "Project Fear," as it was dubbed by his opponents, failed to resonate with a divided country.

"I'm sure I will be remembered for keeping that pledge to hold a referendum when many people thought that promise would never be kept," he told ITV.

"But I hope that people will look back at the 11 years I was leader of the Conservative Party and six years as Prime Minister of our country as a time when we did create a stronger economy -- 1,000 people found work for every day I was prime minister -- and we did make some important social reforms ... and the Conservative Party went from being in the doldrums and getting beaten to being a modernizing, winning force in British politics.

"But the historians will have to work all that out. I obviously now am going to be looking at a new life, but I'm only 49 -- I hope I can still contribute in terms of public service and contribute to our country."

JUST WATCHED Who is Theresa May? Replay More Videos ... MUST WATCH Who is Theresa May? 01:18

May, who is now tasked with dealing with the fallout from Brexit, expressed pride in having served alongside her predecessor.

"I was proud to serve in David Cameron's Government -- and under his leadership we achieved great things," May wrote on her Facebook Page.

"Not just stabilizing the economy, but also making great strides in delivering serious social reform.

I was proud to serve in David Cameron's Government -- under his leadership we achieved great things. I wish him well: https://t.co/yfDLsyLdsr — Theresa May (@theresa_may) September 12, 2016

"His commitment to lead a one nation Government is one that I will continue -- and I thank him for everything he has done for the Conservative Party and the country. I wish him and his family well for the future."

Cameron is now focusing on that future, and while he did not elaborate on his plans, he insisted he would not shy away from campaigning on the issues he is passionate about.

"The only firm decision I've made is to leave the House of Commons and stop being an MP -- as I say, with a heavy heart, because I've loved the jobs but I don't think it works for a former prime minister who resigned in my circumstances and with all the new government needs to do," he added.

"Issues for the future. I'll decide them in the future and, hopefully, as I say, continue to make some ... public service contribution to this country. I want to continue campaigning on the local, national and indeed international issues that were part of my prime ministership where I think we made some good progress. There's still a lot more to be done."