By Andrew Osborn and Guy Faulconbridge
LONDON (Reuters) - Prime Minister David Cameron's plans to join a potential military strike on Syria were thwarted on Thursday night when Britain's parliament narrowly voted against a government motion to authorize such action in principle.
In a humiliating defeat for the British leader likely to damage Cameron's hopes of being re-elected in 2015 and set back traditionally strong U.S.-UK relations, parliament defied Cameron by 285 to 272 votes.
Commentators said it was the first time a British prime minister had lost a vote on war since 1782, when parliament effectively conceded American independence by voting against further fighting to crush the colony's rebellion.
Speaking immediately after the vote, Cameron told lawmakers he would not seek to go against parliament's will.
"It is very clear tonight that while the House has not passed a motion, it is clear to me that the British parliament, reflecting the views of the British people, does not want to see British military action - I get that and the government will act accordingly," he said.
British Defense Secretary Philip Hammond later said he thought the United States, a key ally, would be disappointed that the UK "will not be involved.
He added: "I don't expect that the lack of British participation will stop any action." But, he told BBC TV, "It's certainly going to place some strain on the special relationship," referring to ties with Washington.
U.S. officials suggested President Barack Obama might be willing to proceed with limited action against Syria even without allied support, but that no final decision had been reached.
Veto-holding members of the United Nations have held inconclusive debates on a draft Security Council resolution that would authorize "all necessary force" in response to the alleged gas attack by Syria's government.
Cameron's defeat calls into question Britain's traditional role as the United States' most reliable military ally, a role that Cameron worked hard to cement.
"There will be a national soul-searching about our role in the world and whether Britain wants to play a big part in upholding the international system," finance minister George Osborne, one of Cameron's closest allies, told the BBC.
When asked whether the parliamentary defeat would damage Britain's alliance with the United States, Osborne said: "There's a bit of hyperbole on this in the last twenty four hours. The relationship with the United States is a very old one, very deep and operates on many layers."
Cameron's defeat also underscores how bitter the legacy of Britain's involvement in the 2003 Iraq war remains a decade later.
On that occasion, Britain, under the leadership of then-Prime Minister Tony Blair, helped the United States invade Iraq after asserting - wrongly, it later turned out - that President Saddam Hussein possessed weapons of mass destruction.
Already embroiled in Afghanistan, Britain was then sucked into a second quagmire in Iraq, losing 179 soldiers in eight years after the 2003 U.S.-British invasion that toppled Saddam.
Speaking during an at times impassioned debate on Thursday that preceded the vote, Cameron acknowledged that painful legacy.
"I am deeply mindful of the lessons of previous conflicts, and in particular the deep concerns in the country caused by what went wrong with the Iraq conflict in 2003," he said.
"One thing is indisputable: The well of public opinion was well and truly poisoned by the Iraq episode and we need to understand the public skepticism."
Cameron previously implored the world not to stand idly by over Syria's suspected use of chemical weapons but ran into trouble from skeptical lawmakers within his own party and from the opposition Labour party who demanded to see more evidence before voting in favor of military action.
Although some commentators hailed his defeat as proof that British parliamentary democracy was alive and well, others said he had put his credibility on the line and lost.
Earlier on Thursday, Cameron's government published legal advice it said showed it was legally entitled to take military action against Syria even if the United Nations Security Council did not approve such action.
It also published intelligence material on the August 21 chemical weapons attack in Syria's civil war, saying there was no doubt that it had occurred and that it was "highly likely" Syrian government forces were responsible. The nerve gas attack killed hundreds of civilians in an embattled suburb of Damascus.
The defeat was all the more galling for Cameron since he had cut his summer holiday short, recalled parliament for an emergency debate and held an extraordinary meeting of Britain's National Security Council as well as making numerous calls to Obama and other allies.
POISONOUS IRAQ LEGACY
Obama has set out the case for a limited military strike on Syria, but some U.S. lawmakers say they have not been properly consulted.
Speaking after the vote, the White House said Obama would decide on a response to chemical weapons use in Syria based on U.S. interests, but that Washington would continue to consult with Britain.
UK opposition Labour leader Ed Miliband, a man critics often impugn as being a lightweight political foe to the more statesman-like Cameron, played a big role in the prime minister's defeat.
He had unexpectedly announced on Wednesday night that he wanted important amendments to the government motion before he could back it.
Addressing parliament, Miliband struggled to find his composure but advised lawmakers not to rush to judgment "on a political timetable set elsewhere," a thinly disguised reference to the United States.
Domestically, Cameron's authority looks dented. Part of his problem is that he governs as part of a two-party coalition because his Conservatives lack an absolute majority in parliament, exposing him to such impromptu revolts.
Cameron's critics are already circling. Their main allegations: He is not a conviction politician and fails to prepare the ground properly for his policies.
But public opinion was never on his side.
A YouGov poll published on Thursday showed that 51 percent of the British public opposed a missile strike, with just 22 percent in favor of it.
(Additional reporting by William James, Belinda Goldsmith, Marie-Louise Gumuchian and Costas Pitas in London and Michele Kambas in Cyprus; Editing by Mark Heinrich and Cynthia Osterman)