LONDON Theresa May became Britain's prime minister on Wednesday with the task of leading it out of the European Union, and quickly named leading 'Brexit' supporters including former London mayor Boris Johnson to key positions in her new government.

The former Conservative interior minister, 59, said after being appointed by Queen Elizabeth that she would champion social justice and carve out a bright new future for Britain after last month's shock referendum vote to quit the EU.

"We will rise to the challenge. 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 outside 10 Downing Street, vacated hours earlier by David Cameron.

Cameron stepped down after Britons rejected his entreaties to stay in the EU, a decision that has set back European efforts to forge greater unity and created huge uncertainty in Britain and across the 28-nation bloc.

May faced immediate pressure from EU leaders to serve formal notice of Britain's withdrawal and set the clock ticking on a two-year countdown to its final departure.

In phone calls with German Chancellor Angela Merkel and French President Francois Hollande, May said she needed time.

"On all the phone calls, the prime minister emphasised her commitment to delivering the will of the British people to leave the European Union," a spokeswoman for May said.

"The prime minister explained that we would need some time to prepare for these negotiations and spoke of her hope that these could be conducted in a constructive and positive spirit."

Just over an hour after entering her new office, she started naming ministers, appointing the steady and experienced foreign minister Philip Hammond to take charge of the finance ministry. He replaces George Osborne, whose determination to balance Britain's books made him synonymous with austerity.

In a major surprise, May named Johnson, a leading eurosceptic who had until recently been seen as her main rival for the prime minister's job, to take over as foreign secretary.

Other prominent 'Leave' campaigners were also rewarded. One, David Davis, took the key role of Secretary of State for Exiting the European Union. Another, Liam Fox, was named to head a new international trade department.

May herself had sided with Cameron in trying to keep Britain inside the EU, so needed to reach out to the winning Leave side in order to heal divisions in the ruling party and show her commitment to respecting the popular vote. "Brexit means Brexit" has quickly become her new mantra.

By awarding such a senior job to Johnson, she also showed a conciliatory side. The two had clashed over policing in London while Johnson was serving as mayor. And since last month's vote, for which he campaigned vigorously, Johnson had suffered widespread criticism and ridicule for failing to present a clear Brexit plan and swiftly dropping out of the leadership race.

With his unkempt blonde hair, bumbling humour and penchant for Latin quotations, the man known to Britons simply as 'Boris' will be the government's most colourful figure, but a controversial choice for conducting sensitive diplomacy with world leaders.

Asked by a reporter whether he would apologise to U.S. President Barack Obama for controversially saying the "part-Kenyan" president was biased against Britain because of "an ancestral dislike of the British empire", Johnson said: "The United States of America will be in the front of the queue."

The quip was a reference to a comment by Obama during Britain's EU referendum campaign that the country would be at the back of the queue for trade deals if it voted to leave the bloc.

Among other appointments, rising star Amber Rudd switched from the energy ministry to take May's old job as Home Secretary.

'BURNING INJUSTICE'

May is Queen Elizabeth's 13th prime minister in a line that started with Winston Churchill. An official photograph showed her curtseying to the smiling monarch.

Seen as a tough, competent and intensely private person, already being compared to Germany's Angela Merkel, she must now try to limit the damage to British trade and investment as she renegotiates the country's ties with its 27 EU partners. She will also attempt to unite a fractured nation in which many, on the evidence of the referendum, feel angry with the political elite and left behind by the forces of globalisation.

In comments addressed to ordinary Britons, she spoke of the 'burning injustice' suffered by large sections of society: poor people facing shorter life expectancy; blacks treated more harshly by the criminal justice system; women earning less than men; the mentally ill; and young people struggling to buy homes.

Acknowledging the struggles faced by many, May declared: "The government I lead will be driven not by the interests of the privileged few, but by yours. We will do everything we can to give you more control over your lives."

She spoke of the "precious bond" between the nations of the United Kingdom, implicit recognition of the tensions generated by the referendum in which England and Wales chose to quit the EU, but Scotland and Northern Ireland voted to stay, raising the possibility of a new Scottish vote on independence.

Outside Downing Street, a group of demonstrators chanted: 'What do we want? Brexit! When do we want it? Now!'

The United States congratulated May and said it was confident in her ability to steer Britain through the Brexit negotiations.

"Based on the public comments we've seen from the incoming prime minister, she intends to pursue a course that's consistent with the prescription that President Obama has offered," White House spokesman Josh Earnest said.

May's predecessor Cameron, appearing earlier in Downing Street with his wife Samantha and their three children, delivered his parting remarks to the nation after six years dominated by the Europe question and the aftermath of the global financial crisis.

"It's not been an easy journey and of course we've not got every decision right," he said, "but I do believe that today our country is much stronger."

In his last parliamentary session as leader, Cameron took the opportunity to trumpet his government's achievements in generating one of the fastest growth rates among western economies, chopping the budget deficit, creating 2.5 million jobs and legalising gay marriage.

Yet his legacy will be overshadowed by his failed referendum gamble, which he had hoped would keep Britain at the heart of a reformed EU.