Britain's Prime Minister David Cameron speaks outside 10 Downing Street, London as his wife Samantha looks on on Friday. Mr. Cameron says he will resign in the wake of Britain's vote to leave the European Union and leave office before his Conservative Party's conference in the fall.

In the wake of Britain's historic vote to leave the European Union, Prime Minister David Cameron announced his resignation on Friday.

"The British people have made the very clear decision to take a different path and as such I think the country requires fresh leadership to take it in this direction," he told reporters outside his 10 Downing Street residence on Friday, saying he would leave office before his Conservative Party's conference in October.

News of Mr. Cameron's resignation, which came after he had strongly campaigned against the referendum, provoked a mixed reaction, though it appeared to unite some of the prime minister's political enemies who have now changed tune and praised his work.

But his decision also raised questions about his legacy, especially given his role in passing a series of harsh austerity policies that some "leave" campaigners had argued could end if Britain voted to leave the EU.

"I'm afraid those who chose this referendum as their instrument of revenge against him have won the day. The right wing has gained the upper hand and that is the direction the conservative party is now going to go," he added.

Boris Johnson, the former mayor of London and a prominent "leave" campaigner who is now expected to vie for the prime minister's chair, also praised Cameron as "one of the most extraordinary politicians of our age," as he hailed the Brexit vote on Friday.

Mr. Johnson, a fellow Conservative who has emerged as an early favorite to become the next prime minister, cast the vote as a democratic victory.

But he added, "I want to speak directly to the millions of people who did not vote for this outcome, especially young people who may feel that this decision involves somehow pulling up the drawbridge because I think the very opposite is true. We cannot turn our backs on Europe."

Adding complexity to the debate over Cameron's legacy as prime minister is the fact that the referendum came about as part of a political pledge he made if his party won a majority in last year's general election.

Some critics said Cameron's "cockiness" proved fatal. "He gambled Britain and Europe's future to shore up his own position. With all the confidence of a member of the Etonian officer class, he thought he'd win," wrote The Guardian's Aditya Chakrabortty. "Instead he has bungled so badly that the fallout will drag on for years, disrupting tens of millions of lives across Europe."

Mr. Chakrabortty argues that Cameron is one in a line of prime ministers, including Margaret Thatcher and Tony Blair, to pursue "economic inequality" that benefits inner London while alienating many other parts of the country.

As the Conservative Party chooses a new leader, Mr. Corbyn said, "We actually need to have a pretty clear objective of where we're going as a country," including Britain's relationship with Europe.

"If there's going to be some rush now for an austerity budget we would strongly oppose that, because I think the message of this referendum campaign has been that many communities in Britain feel rather dislocated from the mainstream of society," he added.

As he announced his resignation, Cameron said the decision of when to trigger Article 50 – the official step taken when a member state leaves the EU – should be left to his successor, Reuters reports.