"Her Majesty the Queen has asked me to form a new government and I have accepted," Cameron told reporters outside his new home in Downing Street.
This news was greeted warmly by the White House. President Obama phoned Cameron promptly saying, "The United States has no closer friend and ally than the United Kingdom, and I reiterated my deep and personal commitment to the special relationship between our two countries."
Obama said he had invited the Camerons to the White House this summer.
"This is going to be hard and difficult work," he told reporters as he laid out his plan to form a coalition with Britain's third party, the Liberal Democrats.
"I aim to form a proper and full coalition between the Conservatives and the Liberal Democrats," he said. "I believe that is the right way to provide this country with the strong, the stable, the good and decent government that I think we need so badly."
Cameron's statement came shortly after Prime Minister Gordon Brown travelled to Buckingham Palace to submit his resignation to the queen, and in effect acknowledged defeat.
The announcement brings to an end five fraught days of negotiating among Britain's three main parties, after last week's elections yielded no clear winner and Britain's first hung parliament for 36 years.
Nick Clegg will act as Cameron's deputy prime minister. "It has been agreed that five Cabinet posts will be filled by Liberal Democrats, including the appointment of Nick Clegg" Downing Street confirmed tonight.
This will be the first coalition government in the U.K. since 1945.
"I think the last couple of days have been an incredible couple of days. It's been a roller-coaster. I can't remember anything like this in British politics since World War Two. This is new, uncharted territory for British politics," Wyn Grant, politics professor at Warwick University, told Reuters.
The markets and the electorate were both growing restless at the lack of agreement between the parties.
"I'm as impatient as anybody else to get on with this, to resolve matters one way or another," Nick Clegg, the Liberal Democrat leader and kingmaker, told reporters outside his house this morning.
The finer details of this deal have yet to be publicly announced.
So far Conservative sources have confirmed George Osborne, David Cameron's right hand man, will be the Chancellor, and William Hague will be the Foreign Secretary.
Both the Conservative and Liberal Democrat parties are holding meetings tonight to discuss the possibilities.
It was unclear which way Clegg was going to go after Brown's surprise announcement Monday night that he had been approached by Clegg "to take forward formal discussions with the Labour party."
But earlier today reports emerged that these talks had ended in failure. Dubbed by the British media as the "coalition of the losers," a Labour and Liberal Democrat alliance could still not have held a majority in the houses of Parliament.
Even within the Labour party this union was met with resistance. Some questioned the party's moral legitimacy to govern after it came in second in last week's elections.