David Cameron became “distracted” after the 2011 intervention in Libya, US President Barack Obama has said.
Speaking to the Atlantic magazine, he said the operation went as well as he had hoped, but Libya was now “a mess”.
The article also said he had warned the PM the UK would have to pay its “fair share” and spend 2% of GDP on defence.
In response, Number 10 said there were “many difficult challenges” in Libya, while the White House said it deeply valued the UK’s contributions.
Downing Street did not comment on President Obama’s remark to the PM about defence spending, reportedly made before Chancellor George Osborne said the government would fulfil a Nato pledge to spend 2% of national income on defence last year.
In response to the interview, a spokesman for the US National Security Council said Mr Cameron had been “as close a partner as the president has had” adding that “we deeply value the UK’s contributions on our shared national security and foreign policy objectives”.
• How did Obama and Cameron fall out?
• Can peace be achieved in Libya?
• Libya country profile
• Cameron defends Libya decisions
BBC North America editor Jon Sopel said the unsolicited statement put out by the White House suggested Downing Street had reacted angrily to the article.
“It’s like we’ve seen a curtain drawn back on the unspun thoughts of President Obama, complete with frustration as well, and what we’ve seen tonight is the White House trying to close the curtain as quickly as it can,” he added.
The toppling of the Gaddafi regime in Libya – following UN-backed air strikes designed to protect civilians – led to a power vacuum and instability, with no authority in full control.
The intervention was led by the UK and France – and in his interview, Mr Obama reflects on “what went wrong”, saying: “There’s room for criticism, because I had more faith in the Europeans, given Libya’s proximity, being invested in the follow-up.”
Mr Cameron, he said, became “distracted by a range of other things”. He also criticised former French President Nicolas Sarkozy, saying he had tried to claim the spotlight.
The former French president, he said, “wanted to trumpet the flights he was taking in the air campaign, despite the fact that we had wiped out all the air defences and essentially set up the entire infrastructure” for the intervention.
President Obama said the intervention “averted large-scale civilian casualties (and) prevented what almost surely would have been a prolonged and bloody civil conflict”. But he added: “And despite all that, Libya is a mess.”
He also criticised what he called “free riders” in the interview, saying European and Gulf countries were calling for action against Gaddafi, adding: “But what has been a habit over the last several decades in these circumstances is people pushing us to act but then showing an unwillingness to put any skin in the game.”
Despite efforts to support Libya’s National Transitional Council, and the first elections in the country for decades, it rapidly descended into violence, with two rival governments and the formation of hundreds of militias, some allied to so-called Islamic State.
In January, Mr Cameron told MPs the “Libyan people were given the opportunity” to build a stable democracy – and it was a matter of “huge regret” they had not taken it.
He stressed that – unlike in Iraq – the post-conflict planning was locally driven.
“Gaddafi was bearing down on people in Benghazi and threatening to shoot his own people like rats,” he said. “An international coalition came together to protect those people and to help the Libyan people, who then got rid of Gaddafi.
“And they had an opportunity to build what they said they wanted.”
Responding to President Obama’s interview, Downing Street said “coming to the aid of innocent civilians who were being tortured and killed by their leader was the right thing to do”.
The government has tried to support stability in Libya and is “working hard to support the UN-led process to establish a stable and inclusive government that will allow them to build a peaceful future”, a spokesman said.
“But ultimately a positive outcome for Libya is not just up to the international community – this process needs to be led by the Libyan people,” he added.
The US National Security Council spokesman added: “With respect to Libya, the president has long said that all of us – including the United States – could have done more in the aftermath of the Libyan intervention.”
He said the UK had “stepped up on a range of issues” including meeting the 2% commitment and pressing other Nato members to do the same.
Former Conservative Foreign Secretary Sir Malcolm Rifkind said it was “a bit rich” for the US president to single out the UK and France, as they had carried out more air operations in the Libya campaign than any other country.