Pakistan on Friday condemned the attack in the German city of Hanau — where a gunman with apparent far-right beliefs killed nine people at a shisha bar and a cafe — and said it remains "deeply concerned at the rising tide of Islamophobia, xenophobia and racial hatred sweeping across many parts of the world".
A press release issued by the Foreign Office said Pakistan stood with the government and people of Germany. Offering condolences to the families of the victims and to the Turkish government for the Turkish who lost their lives, the FO wished the injured a speedy recovery.
"The attacks once more underscore that violent extremism knows no race, religion or nationality," the press release added.
"We reiterate our call for concerted efforts to root out ideologies of hate, as well as address the underlying causes of hate crimes."
The FO said Pakistan was ready to partner with Germany and other "like-minded states" in an effort to "confront and counter Islamophobia and to promote greater inter-religious and inter-civilisational harmony, amity and understanding".
Thousands of people took part in vigils across Germany on Thursday after the shooting.
Chancellor Angela Merkel condemned the "poison" of racism, as anger mixed with grief over the latest and deadliest attack linked to Germany's extreme right in recent months.
The suspect, 43-year-old German Tobias R, was found dead at his home after the rampage along with his 72-year-old mother in what appeared to be a murder-suicide.
Hundreds of people, many carrying candles or a white rose, gathered in silence in Hanau in the evening to show solidarity with the victims.
Large crowds also gathered in Frankfurt and at Berlin's Brandenburg Gate, some carrying signs that read "Take racism personally" or "Never Again!", in scenes replicated across dozens of German cities.
The nine people killed at the two bars late on Wednesday evening were aged between 21 and 44 and all had a "migrant background," although some were German citizens, chief federal prosecutor Peter Frank said.
He added that evidence, including video footage and a "manifesto" found on the suspect's website, showed Tobias R had "a very deeply racist attitude".
The Turkish presidency said five Turkish nationals were among those killed.
A Bulgarian and a Bosnian were also among the dead.
The Kon-Med association of Kurds in Germany said there were "several victims of Kurdish origin", and criticised German authorities for not taking a tougher stance against "far-right terrorism".
"Racism is a poison, hatred is a poison and this poison exists in our society and it is already to blame for far too many crimes," Merkel said while speaking in Berlin.
She recalled the murders carried out by the neo-Nazi "NSU" cell between 2000-07, as well as last June's killing of pro-migrant politician Walter Luebcke as examples of the threat posed by the far right.
She also cited October's deadly anti-Semitic attack in Halle, which raised alarm over rising anti-Jewish hatred in Germany.
Wednesday's rampage started at around 10pm at the Midnight shisha bar in central Hanau, some 20 kilometres east of Frankfurt.
The gunman reportedly rang the doorbell and then shot at people in the smoking section, mass-market daily Bild said.
He fled the scene by car before opening fire at the Arena Bar & Cafe.
After a massive manhunt, the suspect was found dead at his flat, along with his mother. Both were killed by gunshot.
Prosecutor Frank said investigators were trying to determine if the suspect had accomplices, or contacts in Germany or abroad who might have known about the attack plans.
Relatives and friends of the victims gathered at the Arena bar on Thursday, an AFP reporter said, tearfully embracing one another.
"I couldn't be any more upset," said Inge Bank, 82, who lives near the bar.
"We have to nip it in the bud if the Nazi party is coming back," Bank said, adding that she had lived through World War II.
German President Frank-Walter Steinmeier placed a wreath of white flowers outside the Arena bar on Thursday evening before addressing the main Hanau vigil.
Steinmeier, who serves as a moral compass for the nation, condemned the shooter's "brutal act of terror".
But he said he was heartened to see "thousands, maybe even tens of thousands" turning out across the country to honour the victims.
"We stand together, we want to live together and we show that over and over again. That is the strongest way to fight hatred," he said, to the occasional shout of "Nazis Out!" from the crowd.
Elsewhere, Frankfurt's Eintracht football team held a minute's silence ahead of its Europa League match against RB Salzburg.
In a rambling 24-page document seen by AFP, the alleged gunman wrote that people from more than two dozen countries, including Turkey and Israel, should be "destroyed".
He also said he had never been with a woman, which he blamed on being "watched" by unspecified secret services.
King's College London counter-terrorism expert Peter Neumann tweeted that the text contained "various, but mostly extreme right views, with a do-it-yourself ideology cobbled together out of parts found on the internet".
As condemnation of the Hanau violence poured in, the co-leader of the far-right AfD party Joerg Meuthen stood out by saying the shootings were "neither right- nor left-wing terrorism" but the actions of "a madman".
Politicians from across the political spectrum, however, accused the anti-Islam, anti-immigrant AfD of normalising hate speech and fomenting anti-foreigner sentiment in recent years.
German police have identified around 60 far-right adherents as "dangerous" individuals capable of carrying out a violent attack.
Last Friday, they arrested 12 members of a German extreme right group believed to have been plotting "shocking" large-scale attacks on mosques, similar to the ones carried out in New Zealand last year.