Giving a toast during the White House event, Cameron, a conservative, said he and Obama, a Democrat, had spoken at length "about the importance of the relationship between our two countries and our peoples."
"And as fellow leaders, we've struck up, I believe, a really good partnership," Cameron said. "It is frank and honest. We talk through issues very rationally. We don't need to remind each other of the basic threats that we face; we know them. But there are three things about Barack that really stand out for me: strength, moral authority and wisdom."
Cameron said Obama was strong "when required to defend his national interests," citing the killing of al-Qaida leader Osama bin Laden. "And together with British and coalition forces, America has fundamentally weakened al-Qaida.The president says what he will do and he sticks to it."
He said Obama demonstrates moral authority because he "understands that the means matter every bit as much as the ends," and has "pressed the reset button on the moral authority of the entire free world."
He said the U.S. president showed wisdom because he "has not rushed into picking fights, but is steward of America's resources of hard and soft power. He's taken time to make considered decisions, drawing down troops from Iraq and surging in Afghanistan."
During his toast, Obama said praised Cameron's character.
"And I've seen his commitment to human dignity, during Libya," the president said. "I've seen his resolve, his determination to get the job done, whether it's righting our economies or succeeding in Afghanistan."
Guests at the state dinner included British Foreign Secretary William Hague and Chancellor George Osborne, Richard Branson, Apple Inc. Vice President Jonathan Ive, actresses Carey Mulligan and Elizabeth McGovern and actor Hugh Bonneville. The guest list also included Vice President Joe Biden, Secretary of State Hillary Clinton, U.S. Attorney General Eric Holder, actor George Clooney, film producer Harvey Weinstein and pro golfer Rory McIlroy.
Duggar sisters unveil Christian dating rules in new book
Attkisson leaves CBS News, reportedly over network's 'liberal bias'