Two British Islamic State jihadists who died in Syria were killed by an RAF drone strike, David Cameron has said.
Cardiff-born Reyaad Khan, 21, and Ruhul Amin, from Aberdeen, died last month in Raqqa, alongside another fighter, in the first targeted UK drone attack on a British citizen, Mr Cameron told MPs.
Khan - the target - had been plotting "barbaric" attacks on UK soil, he said.
The "act of self defence" was lawful, despite MPs previously ruling out UK military action in Syria, the PM said.
Khan was killed in a precision strike on 21 August by a remotely piloted aircraft, "after meticulous planning", while he was travelling in a vehicle.
Another British national, Junaid Hussain, 21 and from Birmingham, was killed in a separate air strike by US forces in Raqqa on 24 August.
Both Khan and Hussain had been involved in actively recruiting IS "sympathisers" and plotting to attack "high-profile public commemorations" taking place in the UK this summer, the prime minister said.
The attorney general had been consulted and agreed there was a "clear legal basis" for the strike on Khan, Mr Cameron added.
Acting Labour leader Harriet Harman urged the government to publish the legal advice.
Downing Street said it was a "long-standing convention that we do not publish advice of the law officers".
Two years ago MPs rejected possible UK military action in Syria, but last September approved British participation in air strikes against IS targets in Iraq only.
However, officials said the UK would "act immediately [in Syria] and explain to Parliament afterwards" if there was "a critical British national interest at stake".
The strike on Khan was "the first time in modern times that a British asset has been used to conduct a strike in a country where we're not involved in a war", the PM confirmed.
"Of course Britain has used remotely piloted aircraft in Iraq and Afghanistan but this is a new departure and that's why I thought it important to come to the House and explain why I think it is necessary and justified."
Mr Cameron told MPs: "My first duty as prime minister is to keep the British people safe."
In reference to Khan, he added: "There was a terrorist directing murder on our streets and no other means to stop him.
"This government does not for one moment take these decisions lightly.
"But I am not prepared to stand here in the aftermath of a terrorist attack on our streets and have to explain to the House why I did not take the chance to prevent it when I could have done."
By BBC defence correspondent Jonathan Beale
Unmanned Reaper drones joined RAF Tornado jets in conducting surveillance and air strikes soon after Parliament authorised military action against the group calling itself Islamic State last September.
The vote confined that military action to Iraq, but at the time the prime minister told MPs he "reserved the right" to act elsewhere "if there were a critical British national interest at stake".
The government will argue the air strike on Reyaad Khan was such a case. But carrying out an RAF air strike in Syria will still be controversial; even more so because a British citizen was targeted.
Though government officials insist that he posed a direct threat to the UK and was on a legitimate "target list", there'll be plenty of questions. What was the intelligence on which the decision was based? Whose target list was he on?
There are reports the CIA has compiled a list of high-value targets. There will inevitably be some suspicion around the secrecy - the MoD has never publicly stated how many Reapers the RAF is operating or where they're based.
The fact that RAF Reapers have been flying over Syria is not in itself a surprise. Defence Secretary Michael Fallon told MPs last October they would be conducting surveillance missions.
But in a written statement he also stated: "Reapers are not authorised to use weapons in Syria; that would require further permission."
In his address to the Commons, the prime minister also said:
- The strike had been approved at a meeting of "the most senior members" of the National Security Council, and authorised by Defence Secretary Michael Fallon
- The UK acted under the "inherent right of self-defence" contained in the Charter of the United Nations, based on evidence from intelligence agencies
- British security forces had foiled six attempted terror attacks in the UK in the past year
- The UK had a "moral responsibility" to help people fleeing the Syrian conflict and would accept up to 20,000 refugees from Syria over the next five years
Following the statement, former attorney general Dominic Grieve said it was possible the decision taken by the government could be "legally reviewed or challenged".
Labour's Ms Harman called for "independent scrutiny" of the attack, asking: "Why didn't the attorney general authorise this specific action rather than merely 'confirming there was a legal basis for it'?"
A family friend of Khan's from Cardiff, Mohamed Islam, called for an investigation "to see the truth of this incident".
He said it was "very complicated, very sad and very hard" for Khan's family.
Kat Craig, from human rights group Reprieve, called the air strike "deeply worrying".
"Make no mistake - what we are seeing is the failed US model of secret strikes being copied wholesale by the British government," she said.
BBC security correspondent Frank Gardner said the targeting of Khan by his own country had set a precedent.
The prime minister's official spokesman said any future decisions on whether to target IS militants believed to pose a threat to the UK would be taken on a case-by-case basis, and declined to say whether any other such strikes have been authorised.