"The murderous attack in Munich shocked me deeply," Gauck was quoted as saying in a press release of the Presidential Office.
His thoughts are with the victims and all those who were mourning or fearing for a loved one, it said. "And I feel connected with all that are in operation in order to protect people and save lives."
Meanwhile, Steimeiner also said on his twitter account that he is horrified by the attack.
"I am thinking of people in Munich. Its good to know that our friends in Europe and the world stood by us," as he wrote.
"Our thoughts are with the victims of the attack, and even with the police officers who are defending our freedom and security," also said Peter Altmaier, head of German Federal Chancellery, to German ZDF public television on Friday night over the attack in Munich.
German Chancellor Angela Merkel, who is on holiday since Friday, is kept informed, Altmaier said, adding that competent ministers are on the way to Berlin. "We will discuss the situation tomorrow in the German federal security cabinet."
Meanwhile, as German media Zeit Online reported, German Interior Minister Thomas de Maiziere has canceled his trip to the United States immediately after the shootout in Munich. The minister wanted to fly back to Germany directly after landing in New York.
As the German Interior Ministry announced on Twitter, de Maiziere will get a picture of the situation on site on Saturday morning in Munich.
The number of the people died in the shootout in a Munich shopping mall rose to nine, according to the latest update Munich police announced on their Twitter account on Friday evening.
After the police firstly announced eight fatal casualties on Twitter, they updated with another Tweet saying that the police is verifying the possibility of another dead person they had found "being involved in the shooting".
In addition, the policed confirmed "several injured, whose number is not yet known yet" in a latest press release. However, German local media Bayerischer Rundfunk reported that about 20 injured are being treated in hospitals.
At the moment, no perpetrator could be arrested. The search for them is running at full speed, said the police.
A spokesman of Munich police said on Friday evening that the investigators assume three perpetrators, for whom the police is searching in the whole urban area of Munich.
The police called the shootout in Munich as an "acute terror situation", as German news television N-TV reported earlier, citing an official announcement of Munich police.
Due to the still unclear situation, the police asked all people in Munichs urban area to stay at home or to search protection in nearby buildings.
Munich police reported earlier that they were carrying out a large-scale operation in a Munich shopping center due to a shootout.(*)