Image copyright Getty Images Image caption Vigils have been held across the US - including this one in Washington DC

Turkish President Recep Tayyip Erdogan has criticised US President Barack Obama for his silence over the murder of three Muslim students in the US.

He said politicians were responsible for events in their countries and had to clarify their stance over them.

More than 5,000 people attended the funeral of the students who were shot dead in North Carolina on Tuesday.

With a suspect in custody, police are still investigating the motive, amid family claims it was a hate crime.

The shootings took place in the town of Chapel Hill. Initial indications are that the gunman, Craig Hicks, acted in a dispute with the victims over a parking space, according to the police.

A district prosecutor said on Wednesday there was no evidence that the victims - Deah Shaddy Barakat, wife Yusor Mohammad and her sister Razan - had been targeted because of their faith.

Media playback is unsupported on your device Media caption President Erdogan: "If you stay silent when faced with an incident like this, and don't make a statement, the world will stay silent towards you"

However, at Thursday's funeral in Raleigh, the local police chief said his force would investigate every lead, including the possibility of a hate crime.

The murders have resonated both within US and around the world, especially on social media. The hashtag ChapelHillShooting has been used hundreds of thousands of times.

Image copyright AP Image caption Thousands attended the funeral in North Carolina on Thursday

Image copyright Reuters Image caption The Turkish leader made his comments while on a visit to Mexico

Speaking on a visit to Mexico, Mr Erdogan criticised Mr Obama, Secretary of State John Kerry and US Vice-President Joe Biden for not having made any statement about the murder of the "three Muslims".

"If you stay silent when faced with an incident like this, and don't make a statement, the world will stay silent towards you," he said.

"As politicians, we are responsible for everything that happens in our countries and we have to show our positions."

Mr Erdogan is a devout Sunni Muslim who has been increasingly critical of the treatment of Muslims living in Western societies.

His relations with the Obama administration have also come under strain over the conflict in Syria and Iraq.

Turkey and the US are allies in the campaign against Islamic State militants, but differences over tactics have emerged over the last six months.

At the funerals - Rajini Vaidyanathan, BBC News

Media playback is unsupported on your device Media caption Thousands gathered to pay last respects - Rajini Vaidyanathan reports

"Everybody is your neighbour, everybody is family here," was how one mourner described the Chapel Hill/Raleigh area, where the students lived.

Home to a number of university campuses, as well as tech and science companies in the so called "research triangle", people say it's a tolerant and open minded place. Which makes these murders all the more shocking.

Deah and Yusor and Razan have been described to me as smart, popular, fun students who worked hard and enjoyed sport. Above all, people remember them as kind, supportive and selfless. That they could provoke so much anger in a mere parking dispute - enough to cut their short lives short - is utterly inexplicable to people.

This is a hate crime, people told me time and time again - the victims' religion can't be divorced from the context of the crime, they said.

Sarah, who grew up with all three and says she's experienced Islamophobia, articulated a view many shared: "You have to have a lot of hate in your heart to kill three people in cold blood, and over a parking spot, it's ridiculous to say this was just that".

Neighbours stunned by triple murder

In pictures: Chapel Hill vigils

Thursday's funeral was held at the athletic fields of North Carolina State University where all three victims had been students. Police estimate 5,500 people attended the event.

The BBC's Rajini Vaidyanathan says many mourners felt the murders were sparked by something far deeper than a parking row.

"When we say this was a hate crime, it is all about protecting all other children in the USA,'' the father of the two sisters killed in the attack, Dr Mohammad Yousif Abu-Salha, said.

"It's all about making this country that they loved, where they lived and died, peaceful for everybody else.''

Image copyright AFP Image caption A vigil was held for the victims at the University of North Carolina, where all three were students

Mr Hicks gave himself up to police and has been charged with the murders. His Facebook profile included a photo that read "Atheists for Equality". He also frequently posted quotes critical of religion.

But Mr Hicks's wife Karen said the incident had nothing to do with religion and her husband treated everyone equally. He also apparently had a history of conflicts with neighbours over parking spaces.

Mr Barakat was a dental student at the university and his wife was planning to enrol in the school in the next term.

Muslim and civil rights organisations held more vigils across the country for Thursday evening.

There has been criticism of a perceived lack of coverage in the mainstream media with the hashtag MuslimLivesMatter mentioned almost 100,000 times in the day following the shooting.