The Royal Canadian Mounted Police said four men were shot at a Muslim cemetery just outside of Calgary on Friday afternoon.

Sgt. Jack Poitras said the shooting happened near Cochrane and the injured people were being treated at Calgary hospitals.

Police said there was a funeral at the cemetery and a group of people remained at the site following the service. Poitras said it appears the shooting involved people who were in the group.

Royal Canadian Mounted Police (RCMP) officers man a road block leading to a Muslim cemetery near Cochrane. RCMP said four people were shot at the cemetery just outside of Calgary

Royal Canadian Mounted Police (RCMP) officers man a road block leading to the cemetery

Cpl. Sharon Franks told the Canadian Press: 'We do not believe that this is random incident.

'It appears that there were friends and family gathering for a funeral at this cemetery when an altercation broke out that ended with a gun fight.

'Obviously they were there to mourn a friend and a family member and this is one of those things that is hard to understand.'

She was filmed by CBC News saying: 'We can confirm with you that four males have sustained injuries.

'However, they are believed to be non-life-threatening and they are all expected to make a full recovery.'

A Calgary police vehicle sits outside the Foothill Hospital, where injured Muslim people are treated in Calgary

Franks, according to CTV News, told reporters: 'They are all of the same race.

'We do not believe it is racially motivated.'

Zouheir Osman, who is in charge of the cemetery, said a service for a 21-year-old man was taking place before the shooting. He said he left shortly before the shots were fired.

Osman said he didn't believe the shooting had anything to do with the man being remembered at the funeral.

However, Calgary Imam Syed Soharwardy said he spoke with two people who attended the funeral and they suspect the shooting was gang-related.

'It did not seem to be a hate crime,' Soharwardy said. 'It looks like it was a turf war or gang war or some type of revenge.'

He was quoted by the Canadian Press as saying: 'People were quite suspicious because they had never seen so many young people attending a funeral.'

Despite police assuring the public there was no danger, a heavily armed police tactical team remained outside the Calgary Foothills Hospital on Friday evening

The funeral was for a Pakistani man named Hamza Nazir, said Soharwardy, who knows the family. He said he doesn't know the cause of the young man's death.

Osman told the Canadian Press: 'It has nothing to do with him.

'It was just a heart attack.'