Members of an Islamic terror cell known as The Beatles were identified because they were arrested at an English Defence League (EDL) counter-protest in London, police have said.
The four militants with the so-called Islamic State group carried out acts of brutality in the mid-2010s before three were captured and one was killed.
Alexanda Kotey was jailed in the US in April for his part in the torture and murder of American hostages, while El Shafee Elsheikh will be sentenced on Friday over his role in the plot.
On Wednesday, counter-terrorism chiefs at the Metropolitan Police detailed how officers provided evidence to prosecutors to bring the group to justice.
Speaking at Scotland Yard, Commander Richard Smith said: “I would describe it as one of the most significant international terrorism cases we’ve ever seen brought to trial.
“The level of savagery in the propaganda videos described by the hostages who were held captive and subjected to physical assault was truly shocking.
“This was a remarkable investigation where really determined and highly skilled officers and staff pieced together and unearthed tiny fragments of information gathered from isolated events that occurred years earlier and thousands of miles from where the offence took place.
“They were able to piece these fragments together and the sum of their parts was significant evidence which helped bring these men to justice.”
The investigation began in 2012 after British journalist John Cantlie and American photojournalist James Foley were taken hostage.
Police had no indication of who was behind it, and interviewed released hostages who identified the group as UK nationals.
A “very significant” breakthrough came when one of the freed hostages told officers they had heard the men mention being arrested at an EDL march in London.
Investigators discovered that Kotey and Elsheikh had been detained on September 11 2011 at a Muslims Against Crusades counter-demonstration.
They were part of a group arrested on suspicion of involvement in a stabbing, but were released without charge.
In 2014, messages from Elsheikh were discovered by police after his brother Khalid had his phone seized in a firearms investigation.
Pictures showed Elsheikh in combat gear and holding a gun, while another was taken next to decapitated heads.
The terror cell, nicknamed The Beatles due to their British accents, also comprised ringleader Mohammed Emwazi, known as Jihadi John, who was killed in a drone strike in 2015; and Aine Davis, who was jailed in Turkey in 2017.
Kuwait-born Emwazi was identified by police as the masked-man in videos of hostages being murdered.
Police compared the footage with interviews held with him in the UK in 2012, after he was questioned over a series of thefts, and matched his voice.
After Kotey and Elsheikh were captured, a case was pulled together by the Met and given to the Attorney General, who authorised 139 charges, but the prosecution proceeded in the US.
Kotey was sentenced on eight counts: four of hostage-taking resulting in death; conspiracy to commit hostage-taking resulting in death; conspiracy to murder US citizens outside of the US; conspiracy to provide material support to terrorists, hostage-taking and murder, resulting in death; and conspiracy to provide material support to a designated foreign terrorist organisation resulting in death.
Kotey was charged in relation to the killings of four US hostages: journalists Mr Foley and Steven Sotloff and aid workers Peter Kassig and Kayla Mueller.
Mr Smith added: “I’m delighted, in this case, to see that these two very evil men have been brought to justice.”