A man who posted a message on Facebook saying that "all soldiers should die and go to hell" following the deaths of six Warminster-based troops in Afghanistan has told a court what he wrote was "unacceptable".

Azhar Ahmed, 20, admitted posting the status update after reading about the deaths of the Sergeant Nigel Coupe, Corporal Jake Hartley, Private Anthony Frampton, Private Christopher Kershaw, Private Daniel Wade and Private Daniel Wilford in March.

They were killed by an improvised explosive device (IED) in the deadliest single attack on British forces in Afghanistan since 2001.

Huddersfield Magistrates' Court heard Ahmed posted his message two days after the deaths.

It said: "People gassin about the deaths of Soldiers! What about the innocent familys who have been brutally killed.

"The women who have been raped. The children who have been sliced up!

"Your enemy's were the Taliban not innocent harmful (sic) familys. All soldiers should DIE & go to HELL! THE LOWLIFE F****N SCUM!

"gotta problem. go cry at your soldiers grave and wish him hell because thats where he is going."

Ahmed told the court he immediately started to receive critical comments on his page and realised the second half of his post was "unacceptable".

However he denied it was "grossly offensive", telling a district judge he thought it would have been "upsetting" and caused "distress".

Ahmed denies sending a message which was grossly offensive.

The soldiers were from, or attached to, Corunna Company of 3rd Battalion The Yorkshire Regiment, which was deployed in Helmand Province near Lashkar Gah.

The battalion is based in Warminster at Battlesbury Barracks, in Woodcock Road.