Refuge is being offered to people stranded near Munich through social media.

Several people are feared dead and many are thought to have been injured in a gun attack near the Olympia shopping centre, prompting the closure of transport links across the city. Munich Police have urged people to avoid public places.

READ MORE: Munich shopping centre attack: What we know so far as police say shooting is 'suspected terrorism'

In response, hundreds of people have taken to Twitter using the hashtag #OffeneTur - or #OpenDoor - inviting people to stay if they are unable to get home.

Facebook's Safety Check feature has also been activated so that people can let friends and family know that they are safe.

It was most recently used in the wake of the Nice attack earlier in this month.

People also opened their homes under the hashtag #PorteOuverte during the Nice attack and Paris attacks in November to help people find safety.

Munich's main railway station has been evacuated and rail travel and local public transport in the area has been stopped, according to Bavarian radio station Antenne Bayern.

Nightclubs in Munich will be closed on Friday night, a local television network reported.

READ MORE: Munich shopping centre attack: What we know so far as police say shooting is 'suspected terrorism'

Drivers have been urged to clear the motorways surrounding Munich, the newspaper Abendzeitung said.

Scotland's First Minister Nicola Sturgeon Tweeted that she was horrified by the reports of the shooting, and that her thoughts were with the people and emergency services on the scene. 

The Herald:

US president Barack Obama said: "Our hearts go out to those who may have been injured. It's still an active situation and Germany is one of our closest allies so we are going to pledge all the support that they may need in dealing with these circumstances."

He said it was a "good reminder" that people's "way of life, our freedoms, our ability to go about our business every day" was dependent on law enforcement.

READ MORE: Munich shopping centre attack: What we know so far as police say shooting is 'suspected terrorism'

A British Foreign Office spokesman said: "We are urgently seeking further information following the ongoing incident in Munich. We are touch with the relevant authorities."