LONDON — David Cameron, the youthful leader who modernized the party of right-wing icon Margaret Thatcher, became prime minister Thursday after the resignation of Gordon Brown — capping a gripping election saga that returns the Tories to government after 13 years of Labor Party rule.
According to tradition, Queen Elizabeth II appointed Cameron at Buckingham Palace — the stately denouement to a behind-the-scenes fight between Cameron and Brown for the cooperation of Britain's third-place party, after an election that left no party with a majority. Within minutes, Cameron was installed at No. 10 Downing Street and an announcement followed that Liberal Democrat leader Nick Clegg would become deputy prime minister after days of hard bargaining with his former political rivals.
The 43-year-old Cameron becomes Britain's youngest prime minister in almost 200 years — the last was Lord Liverpool at 42 — and cemented a coalition deal with the third-place Liberal Democrats.
Clegg and four other Liberal Democrats received Cabinet posts. A number of other Liberal Democrats would receive junior posts.
Cameron and Clegg agreed to a pact after the Conservative Party won the most seats in Britain's May 6 national election but fell short of winning a majority of seats in Parliament.
Cameron's Conservative Party said ex-leader William Hague will serve as foreign secretary, senior lawmaker George Osborne as treasury chief and lawmaker Liam Fox as defense secretary.
Other leading positions were being finalized, as were key policy decisions ahead of the presentation of the coalition's first legislative program on May 25.
The coalition has already agreed on a five-year, fixed term Parliament — the first time Britain has had the date of its next election decided in advance. Both sides have made compromises, and Cameron has promised Clegg a referendum on his key issue: reform of Britain's electoral system aimed at creating a more proportional system.
Arriving at London's Downing Street hand-in-hand with his wife, Samantha, Cameron said he believed that Britain's "best days lie ahead."
Britain's new government could spell changing relationships with its foreign allies.
Both Cameron and Clegg have signaled they favor looser ties to Washington. Both men back the Afghanistan mission, but Cameron hopes to withdraw British troops within five years. Clegg has said he's uneasy at a rising death toll.
Relations with European neighbors could also become problematic. Cameron's party is deeply skeptical over cooperation in Europe and has withdrawn from an alliance with the parties of Germany's Angela Merkel and France's Nicolas Sarkozy. Clegg, once a member of the European Parliament, has long been pro-Europe.
"We have some deep and pressing problems — a huge deficit, deep social problems, a political system in need of reform," Cameron said, as he took office. "For those reasons, I aim to form a proper and full coalition between the Conservatives and the Liberal Democrats."
Hundreds of onlookers, many of them booing, crowded the gates of Downing Street to watch as Cameron swept into his new home in a silver limousine less than 90 minutes after an emotional Brown had made a farewell address.
"Nick Clegg and I are both political leaders who want to put aside party differences and work hard for the common good and for the national interest," Cameron said.
President Barack Obama telephoned to congratulate Cameron and invited him to visit Washington this summer, according to the White House. Obama told Cameron he looked forward to meeting at an international economic summit to be held in Canada next month.
The political drama came as the Conservative and Liberal Democrat parties hammered out details of a coalition deal after the inconclusive election.
Standing outside 10 Downing Street alongside his wife, Sarah, Brown spoke in strained tones as he wished Cameron well.
"Only those who have held the office of prime minister can understand the full weight of its responsibilities and its great capacity for good."
After his brief statement, the 59-year-old Brown walked hand-in-hand with his wife and young sons John and Fraser down Downing Street, where a car waited to take him to the palace for a 15-minute meeting.
Minutes later he arrived at Labor Party headquarters, where he was greeted warmly by cheering staffers.
Brown told party workers his deputy Harriet Harman would become interim Labor leader until a formal leadership vote takes place to select his permanent successor.