A judge has ruled that a "shocking" DVD showing three British marines allegedly murdering an injured prisoner in Afghanistan must not be released after being told it would be a propaganda gift to extremists and put UK troops and civilians at risk.

Media organisations including the Guardian asked the court martial hearing the men's case to make available footage of the marines allegedly carrying out the shooting of the suspected Afghan insurgent. The footage has been shown in open court and a transcript of it published.

But the judge advocate general, Jeff Blackett, accepted that the footage was so disturbing it could be used to incite attacks against British troops and members of the public.

Arguing that the video clips should not be released, a senior Home Office counter-terrorism expert had told Blackett they would go viral within minutes, would be used by terrorist groups as propaganda and would prompt "lone actors" to attack troops or members of the public.

Paul Mott, the deputy head of the research, information and communications unit (RICU) in the office of security and counter-terrorism, said it was the most potent footage of its kind he had viewed. "I've seen nothing that surpasses it in terms of radicalisation potential. It's exceptionally worrying," said Mott. "There's nothing I have seen that … matches its emotional power. It is a gift in propaganda terms."

Mott said the footage would be disseminated via Twitter, Facebook and YouTube. He said in its raw form it was powerful but terrorists would add their own commentary to it to claim it proves the west was at war with Muslims.

The footage shows a prisoner being dragged across a field in Helmand having been badly wounded by helicopter fire. The clips, captured by a head-camera worn by one of the marines, appear to show the prisoner being shot in the chest by a marine. All three marines, who have been granted anonymity by the court, deny murder.

Mott said the footage was "compelling and distressing". He said it could be a "tipping point" for "lone actors" on the verge of committing an atrocity and told the court in Bulford, Wiltshire, that there had already been talk about the case in extremism forums.

Oliver Glasgow, a barrister for the Ministry of Defence, said the material was "shocking" and would be used as a "call to arms". "It will be taken up by every jihadist group out there," he said. Glasgow also revealed the government had considered asking that the whole trial be held behind closed doors but had decided that it should be heard in open court.

Arguing that the footage should be released – with the soldiers and victim anonymised – Clare Kissin, for the Guardian, Associated Newspapers, the Telegraph Media Group, ITN, BSkyB, News Group Newspapers and Times Newspapers, said there was no evidence that releasing the footage would present a "real and immediate risk to life".

She said the media wanted access to the footage "for use in the context of reporting the ongoing trial", adding: "The proceedings are of clear public interest and reporting and commentary on it involves serious and important questions about the action of service personnel in conflict zones."

Kissin made it clear that publication of the footage would be subject to media organisations' own policies – and regulatory body rules on taste and decency.

Blackett said the default position was that any material presented in open court should be made available to the media, citing the "leading case" on the principle as the Guardian v the City of Westminster magistrates court when it was successfully argued that papers relating to an extradition case should be made available.

But in this case, he said he had to take into account article two of the European convention on human rights, which guarantees the right to life. "In simple terms I must balance the risk of members of the armed forces being killed if the DVD is released against the right of the press to have access to and publish information."

Blackett said the release of the DVD would "generate significant feelings of anger and revenge among certain people and will incite attacks on British service personnel at home and abroad".

He added: "The principle of open justice is immutable but it must be subject to exemptions particularly when dealing with threats posed by terrorist organisations which repeatedly attempt to radicalise people whom they can incite to commit atrocities."

The court martial of the three marines continues.