The government's terror laws watchdog says six men arrested during Pope Benedict's UK visit last September were never involved in a plot.
David Anderson QC said police acted appropriately and the arrests were partly prompted by mistaken identity.
The six Westminster street cleaners were seized amid fears they wanted to attack the Pope mobile.
The men were released without charge amid reports that a canteen joke had been misunderstood.
Scotland Yard counter-terrorism officers launched "Operation Grid" and arrested the six men on 17 September last year on suspicion of plotting to harm the Pope during a visit which began the day before.
Questioned at high security Paddington Green police station, they were released without charge, having been held for between 33 and 42 hours.
The men, aged between 26 and 44, were all North African Muslims and worked for Veolia Environmental Services - which cleans streets in Westminster.
Mr Anderson, the independent reviewer of terrorism legislation, said in this report he had met two of the men, spoken with lawyers and had also questioned detectives from Scotland Yard's Counter-Terrorism Command.
"There is no reason to believe, with the benefit of hindsight, that any of the arrested men was involved in a plot to kill the Pope, or indeed that any such plot existed," he said in his report.
"The powers of arrest, search, seizure under the Terrorism Act 2000 (TA 2000) were, however, in all the circumstances of Operation Grid, lawfully and appropriately used.
"There will be future temptations to use the TA 2000 powers in relation to individuals as to whom the necessary reasonable suspicions do not exist, particularly in the context of international high-profile events such as the London Olympics.
"Constant vigilance is required to ensure that the legal boundaries of those powers are respected, as they were in this case."
The investigation began the day before the arrests when officers received a tip-off from someone saying that he had heard five of the six men discussing a possible attack on the Pope mobile - the distinctive vehicle in which the pope travels at public events.
The source told the police the men had been looking at a picture of the vehicle in London's Metro newspaper and that they debated taking revenge for a recent incident in which a Koran had been burnt.
The alleged plot would involved stopping the Pope mobile and killing those around it, even if the Pontiff himself were to survive.
The source reported to police that "comments were made to the effect that it would be wonderful if the Pope was killed and that there were virgins waiting for them."
In the early hours of the morning, an intelligence officer alerted detectives that one of the five had the same name as a suspect held in connection with the 2004 Madrid train bombings.
Mr Anderson's report says police held a series of meetings on how to best deal with the situation, including speaking to the original source at 4.30am to test his credibility.
The Met's Commander Steven Kavanagh authorised the arrest operation. Only later would it emerge that while the man had the same name as the Madrid suspect, he was not the same person.
During interviews, all six men denied that a "plot conversation" had ever taken place. Very quickly, said Mr Anderson, it became clear that the investigation was "going nowhere".
"Each of the subjects answered the questions put to him, denying all knowledge of any plot against the Pope, of explosives, of terrorism or of associates with such knowledge or tendencies," said Mr Anderson.
"Indeed the majority of them denied any knowledge of a conversation involving the Pope, save along the lines that it was good they could earn more money because of his visit."