A man with a firearm who held several people hostage in an Apple store in central Amsterdam late Tuesday was overpowered after a siege lasting several hours, police said, adding that the last of the hostages had been freed.

Police had deployed several special units to "get the situation under control" after being alerted of an armed robbery at 5:40 pm (1640 GMT) which had rapidly transformed into a hostage situation.

Police said the gunman was "lying on the street and a robot was examining him for explosives" in front of the store in Leidseplein in the heart of the Dutch city.

The last hostage held in the store was safe, they added.

Images on social media showed a gunman holding an unarmed man at gunpoint
Images on social media showed a gunman holding an unarmed man at gunpoint ANP via AFP / Laurens Bosch

"Since the start of the hostage taking ... several people have managed to leave the store," they said earlier.

They were monitoring images circulating on social media which would eventually be used in an investigation, they added.

Tim Wagemakers, an independent journalist who was in a nearby building, tweeted that there were heavily armed police at the site, adding that locals had been asked to remain inside and stay away from their windows.

The building he was in was evacuated during the hostage-taking.

Images on social media showed an assailant holding a man at gunpoint, local media reported. Several witnesses heard gunshots inside the Apple Store, according to the AT5 outlet.