A freelance journalist's undercover investigation into a UKIP MP candidate was in the public interest, the Independent Press Standards Organisation has ruled.
Magnus Nielsen, who was standing for the Hampstead and Kilburn seat in May's general election, complained to IPSO after a story and video was published by the Daily Mirror of him at a rally.
The investigation, into Nielsen and another UKIP candidate, was carried out by a freelance journalist and sold to the Daily Mirror after the editor ruled it was of "great public interest".
Nielsen complained that the article, published on 16 April, breached clauses one (accuracy) and ten (clandestine devices and subterfuge) of the Editors' Code of Practice.
The undercover reporter attended a rally in Westminster organised by Mothers Against Radical Islam and Sharia (MARIAS) in which the candidates were speaking.
The reporter filmed Nielsen delivering a speech in which he warned of the threat which be believes Islam poses to democracy. The freelance then approached him and secretly filmed a conversation. He later joined Nielsen and other demonstrators in a pub without revealing he was a journalist and using an assumed name.
IPSO said: "The newspaper said that the use of subterfuge and misrepresentation was both necessary and justified on this occasion. It said that MARIAS has links with far-right groups, and that these links are at odds with UKIP’s position that membership is not open to those who are members of, or have previously been members of, far-right organisations.
"It said that the Editor believed that it was of great public interest that the electorate was fully informed of the true opinions of parliamentary candidates."
The Mirror said the reporter had used a secret camera because he was "concerned for his security".
IPSO noted: "After the freelance journalist brought the story to the newspaper, the news team raised it at an editorial conference.
"During discussions between the Editor and an editorial executive it was decided that the journalist had gathered sufficient evidence that subterfuge was justified on this occasion.
"The Editor believed that it was justifiable to place in the public domain the question of whether the complainant’s role as a UKIP candidate was compatible with his 'extreme beliefs' about Islam, this concern having been highlighted to the newspaper by the freelance journalist when he presented it with the story."
The regulator said that while the freelance had "engaged in misrepresentation and subterfuge", there was a public interest in doing so.
It said: "In this case, the newspaper had been able to show that the complainant’s public views on Islam had varied over time, and it was reasonable for the journalist and newspaper to believe that they would be unable to ascertain his true views of Islam without employing subterfuge and misrepresentation.
"The use of a hidden camera, and the journalist’s failure to disclose his identity, was justified in the public interest, in order to prevent the public from potentially being misled by the actions of the complainant."
IPSO added: "When the newspaper had been presented with the story by the freelance journalist it had appropriately and satisfactorily considered the issues raised under the Code. The Committee found that the newspaper had satisfied the requirements of the public interest section of the Code; there was no breach of Clause 10."
The UKIP candidate complained, under clause one, that the article "had quoted his speech at the rally selectively in order to distort his message". IPSO said he had provided his full speech to demonstrate this.
Nielsen also said that the article wrongly implied he was a member of the English Defence League.
The Mirror said the article had not described Nielsen as an EDL member and IPSO found no breach of clause one.
Email pged@pressgazette.co.uk to point out mistakes, provide story tips or send in a letter for publication on our "Letters Page" blog