Updated

Former British Prime Minister David Cameron announced Monday that he is stepping down as a member of Parliament, just months after leaving 10 Downing Street.

Cameron, a member of the Conservative Party, stepped down as prime minister in July after the United Kingdom voted in a June referendum to leave the European Union, saying the country needed new leadership. Cameron opposed the so-called "Brexit," and campaigned for Britain to remain in the E.U.

However, Cameron remained a member of Parliament for his constituency of Witney in Oxfordshire. He told The Daily Telegraph that he informed current Prime Minister Theresa May of his decision Monday afternoon. The resignation is effective immediately.

Cameron said he had thought "long and hard" about his decision over the summer.

"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," Cameron said in a statement, according to the Telegraph.

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

Cameron had served as leader of the Conservative Party since 2005, and as prime minister since 2010. He has held the parliamentary seat in Witney since 2001, which is considered a safe seat for the Conservative Party.

Cameron’s announcement Monday will trigger a by-election for the seat, and the Conservatives will expect to retain the seat by a comfortable margin.

Former Conservative Party leader William Hague praised Cameron's decision as "the right decision."

"Right decision by David Cameron to leave Commons -- former prime ministers are either accused of doing too little or being a distraction," Hague tweeted.

The resignation marks a sharp turnaround for Cameron, who in July had said he planned to remain a member of Parliament until 2020.