Image copyright Reuters Image caption Police have gathered outside the embassy building in central Beijing

A man has set off a small explosive device close to the US embassy in Beijing, officials have confirmed.

Apart from the attacker, there were no injuries reported and officials say police responded immediately.

Video and images posted on social media show smoke rising from the vicinity of the embassy in the heart of the Chinese capital with crowds gathering.

State media outlet Global Times tweeted that local residents had heard a "thunder-like bang".

A statement from the US embassy in Beijing said a device, which they described as a bomb, had exploded at around 1300 local time (0500 GMT) at the south-east corner of the compound.

Beijing police called it a "suspected firecracker device" which caused a fire. The bomber injured his hand during the incident, but there was no danger to his life and he was immediately sent to hospital.

Police gave his surname as Jiang, and said he was from the Inner Mongolia province.

The BBC's Stephen McDonell at the scene says that normal activities have since resumed at the embassy, with people still lining up for visa applications.

There were earlier reports that police had taken away a woman who had tried to set herself on fire near the embassy at 1100 local time, several hours before the reported blast.

It is unclear if the two incidents were linked.

Attacks on sites in the Chinese capital are rare. The most serious incident in recent years saw a car ploughing into a crowd at Tiananmen Square in 2013, killing five people including the attackers. China blamed the incident on Muslim Uighur separatists.