U.K. Prime Minister Theresa May at forefront of 'great national change'

Theresa May entered 10 Downing Street on Wednesday as Britain's new prime minister, following a bittersweet exit by David Cameron that was tinged with humour and regret.

Britain's new prime minister has appointed cabinet members to help lead the exit from EU

Theresa May takes over from David Cameron as British prime minister and makes her first speech from 10 Downing Street 4:21

Theresa May entered 10 Downing Street on Wednesday as Britain's new prime minister, following a bittersweet exit by David Cameron that was tinged with humour and regret.

"I was the future once," Cameron quipped as he left office. But that future now belongs to May, and it involves instability, uncertainty and tough wrangling over Britain's departure from the European Union.

Britain's transition of power has unfolded with startling speed since the June 23 referendum on EU membership.

Cameron announced his resignation after voters rejected his appeal to stay in the 28-nation bloc, and May, the former home secretary, became Conservative Party leader Monday after an abbreviated contest in which her only remaining rival dropped out.

Then came Wednesday's ceremonial choreography: Two trips to Buckingham Palace and two audiences with Queen Elizabeth that ended with one prime minister out of a job and a new one curtseying to the monarch to begin her term.

Theresa May curtsies to the Queen at Buckingham Palace on Wednesday. (Buckingham Palace via Reuters)

May stood in front of the iconic door of 10 Downing Street with her husband, Philip, as the 13th prime minister of the Queen's reign and the first woman to hold the job since fellow Conservative Margaret Thatcher served from 1979 to 1990.

She acknowledged that Britain faces a rocky road ahead as it undoes 43 years of EU ties and forges a new relationship with its neighbours.

"Following the referendum, we face a time of great national change," May said. "And I know because we're Great Britain we will rise to the challenge.

'New positive role'

"As we leave the European Union we will forge a bold new positive role for ourselves in the world and we will make Britain a country that works not for a privileged few, but for every one of us," she said.

May promised to fight for social justice in a speech that addressed "hard-working families" who have struggled during the years of instability since the 2008 financial crisis. Many of those people, fed up with remote politicians and bureaucrats, voted to leave the EU.

"When it comes to opportunity we won't entrench the advantages of the fortunate few. We will do everything we can to help anybody, whatever your background, to go as far as your talents will take you," May said, in language more often used by left-of-centre politicians, rather than by members of the centre-right Conservative Party.

May began appointing her new cabinet within an hour of taking office, and several posts went to Leave supporters.

Cabinet appointments

The most notable was former London mayor Boris Johnson, who was given the meaty job of foreign secretary, Britain's top diplomatic post. The blond, Latin-speaking Johnson — a leader of the campaign for a British exit, or Brexit — had aspired to be prime minister himself before his bid failed because of party infighting.

Former foreign secretary Philip Hammond was named treasury chief, ousting George Osborne, a strong Remain voice in the referendum. May's former job of home secretary went to Amber Rudd.

May has also created a new post of "Brexit" minister to oversee talks on a British EU exit from the 28-nation EU. That key job went to veteran Conservative lawmaker David Davis — a long-standing advocate of leaving the EU —  and he will lead at least two years of negotiations with the bloc.

Cameron moves on

Wednesday's carefully orchestrated political changeover began with Cameron making a final appearance in Parliament, turning the usually raucous prime minister's question time into a session filled with praise, thanks, gentle ribbing, cheers — and a sprinkle of criticism.

Later, in a brief speech on Downing Street, the 49-year-old Cameron defended his government's legacy.

British PM's parting shot delivered from outside 10 Downing Street 6:44

"It has been the greatest honour of my life to serve our country as prime minister over these last six years, and to serve as leader of my party for almost 11 years," he said. "It's not been an easy journey, and of course we have not got every decision right, but I do believe that today our country is much stronger."

Then, he and his wife, Samantha, and his children — Nancy, 12, Elwen, 10, and Florence, 5 —  left their home of six years and made the short drive to Buckingham Palace.

The palace soon confirmed that Cameron had "tendered his resignation as prime minister and First Lord of the Treasury, which Her Majesty was graciously pleased to accept."

Staff clap as new Prime Minister Theresa May walks into 10 Downing Street on Wednesday. (Stefan Rousseau/Associated Press)

Minutes later, the palace released a photo of May curtseying to the monarch and confirmed that the Queen had "requested her to form a new administration."

As home secretary, the 59-year-old May has been in charge of immigration and law and order for the past six years. She has the tough task of calming the country and global financial markets after the upheaval that followed the referendum.

Although May had backed remaining in the EU, she has reassured Leave supporters that "Brexit means Brexit, and we will make a success of it."

Not all believe her. As May spoke in front of her new residence, a small band of pro-Brexit demonstrators down the street chanted "Theresa May, don't delay!"

No rush for 'Brexit'

She is under pressure from pro-Brexit Conservatives and other EU leaders to start formal exit talks with the bloc. But Tony Travers of the London School of Economics said May probably would not rush to trigger Article 50 of the EU constitution, which starts a two-year countdown to a departure from Europe.

"I don't detect Theresa May being an impulsive person," Travers said. "I think she's a cautious person, and the British political establishment needs to come to terms with this massive decision."

Cameron used his final day in office to try to stake a claim on a legacy beyond his status as the prime minister who — by gambling on a referendum — took Britain out of the EU.

British prime minister says goodbyes and defends Conservative record 1:18

He said his government had cut the deficit, overseen economic growth and legalized same-sex marriage. And he offered the closest thing he has ever given to a mission statement: "I believe that politics is about public service in the national interest."

"I will miss the roar of the crowd, Cameron told Parliament. "I will miss the barbs from the opposition."

He ended by referring to a jibe he directed at then prime minister Tony Blair more than a decade ago: "He was the future once."

"Nothing is really impossible if you put your mind to it," Cameron said. "After all, as I once said, I was the future once."

He left the chamber to applause from all sides of the House and a standing ovation from his Conservative colleagues.

With files from Reuters and CBC News