As the funerals of the Glasgow helicopter crash victims begin to take place, police are investigating claims that offensive comments about those who died in the tragedy have been posted online.

Nine people died in the crash on 29 November when a police helicopter plummeted through the roof of the crowded Clutha pub on the banks of the Clyde. Three of those killed were aboard the helicopter, including pilot Captain David Traill, 51, whose funeral took place on Saturday.

Although Glaswegians have been commended for coming together in the wake of the crash, in a city where sectarian tensions sometimes spill over, the views of extremists have also made themselves heard. Shortly after the tragedy a teenager was detained after allegedly making comments on Twitter. It is believed that most of the subsequent abusive comments now under investigation are of an anti-Catholic nature.

The Lord Advocate's Office says prosecutors from the Crown Office and Procurator Fiscal Service (COPFS) must "take a hard line" against anyone convicted of making comments of a racist or sectarian nature.

Lord Advocate Frank Mulholland said: "It is important that COPFS demonstrates a robust prosecution policy towards such offences committed as a reaction to the incident in recognition of the fact that people died and the impact such crimes will have on their families and friends. This is also in consideration of the other people who were in the Clutha bar and those who attended the scene in the aftermath. I have made it clear that prosecutors must take a hard line against this kind of hate crime."

The inexorable rise of the internet and social media has led to concerns that people aren't sufficiently aware of how the law works and need to be better informed about posting comments online.

Last week Attorney General Dominic Grieve said users of Facebook and Twitter could potentially threaten the entire criminal justice system by jeopardising anonymity orders and making it difficult for accused defendants to get a fair trial. Grieve published court advisory notes usually aimed at mainstream media outlets for users of Twitter and Facebook.