A man who opened fire with a shotgun outside the US embassy in Ankara - just hours after a Russian ambassador was shot dead in a nearby art gallery - has been arrested.

The man, who was named 'Sahir S' in the Turkish state press, approached the Embassy at around 4:30am local time. The building is just a block away from where the ambassador was assassinated.

The suspect fired the shotgun into the air eight or nine times before being detained, reports say. As he was taken away, he shouted 'Don't play with us,' according to RT.

Arrested: This man was arrested outside the US Embassy in the Turkish capital of Ankara after he reportedly fired a shotgun 8-9 times, and shouted 'Don't play with us'

Embassy: The embassy was on temporary lockdown after the incident, which occurred at around 4:30am local time. The man was reportedly identified as 'Sahir S' in state media

General view of the U.S. Embassy the Turkish capital Ankara on December 20

FOOTAGE: Police arrest the gunman outside the US Embassy in Ankara. He swears and says "don't play with us" pic.twitter.com/ZmFzYR2kq0 — DAILY SABAH (@DailySabah) December 20, 2016

It's not known whether anyone was hurt by the suspect, who was identified in state media as 'Sahir S', according to RT.

Photographs show him being led away, apparently uninjured. He appears to be in his forties or fifties.

In video footage he can be heard shouting 'Don't play with us' as he pushes against the group of police officers guiding him to a van.

The lockdown was ended and staff were given permission to leave the compound, although the US Embassy advised citizens to avoid the area until Tuesday morning.

A gunman fires 8-9 times in the air outside the US Embassy in Ankara. Police detained the gunman, increased security around the embassy. — Mahir Zeynalov (@MahirZeynalov) December 20, 2016

The dramatic events follow the shocking murder earlier today of Russian ambassador Andrei Karlov, 62, who was shot dead in an Ankara art gallery just a block away from the US Embassy.

Karlov was killed by Mevlüt Mert Altintas, 22, an off-duty member of the Ankara special forces police department, while speaking at the opening of an exhibition at the Çankaya Municipality Contemporary Arts Center.

Footage of the scene shows the man saying in Arabic: 'We are the descendants of those who supported the Prophet Muhammad for jihad.'

According to local media, his words are similar to the unofficial anthem of Al Nusra, the Syrian branch of Al Qaeda.

In Turkish, Altintas adds: 'Don’t forget about Aleppo. Don’t forget about Syria. As long as our lands are not safe, you will not taste safety … Only death will take me out of here. Anyone who has a role in this oppression, they will all die one by one.'

Altintas also opened fire on hostages, injuring three. He was shot dead after a 15-minute standoff with police.

The US Embassy was also placed on lockdown after that shooting.

The US State Department has advised Americans to 'avoid travel to southeast Turkey and carefully consider the risks of travel to and throughout the country'.

Assassinated: Russian Ambassador to Turkey Andrei Karlov (center) moments before he was shot dead by Mevlüt Mert Altintas (left), an off-duty cop, in an Ankara art gallery