* Bomb detonated near Beijing US embassy compound - embassy
* Police say 26-year-old male detonated "firework device"
* Suspect was only person wounded in blast
* Woman attempted self-immolation near embassy earlier -state media
A bomb exploded outside the US embassy in Beijing on Thursday, wounding the lone assailant, the embassy said in a statement, although police described the weapon merely as a "firework device".
The explosion happened on the street outside southeast corner of the embassy compound. Beijing police said the suspect, a 26-year-old man from China's Inner Mongolia region whom they identified only by the surname Jiang, had injured his hand and had been taken to hospital.
Police did not provide a motive but said in a statement via their official account on the Chinese social networking service Weibo that the suspect had a history of mental illness and was once hospitalised for treatment. The suspect was hearing voices, the statement said.
China and the United States have been involved in a trade dispute initiated by Washington, with the two sides imposing tariffs on $34 billion worth of each other's goods. US President Donald Trump has threatened ultimately to impose punitive tariffs on all Chinese imports.
While Chinese officials and state media have been outspoken in their criticism of Washington's trade moves, there has not been a groundswell of outrage on China's heavily censored social media, and no reported boycotts of US goods.
Witnesses told Reuters that they heard an explosion near the embassy and felt tremors.
"I'd just arrived and started to queue and then heard a loud explosion about 100 metres away," a 19-year-old high school student who gave his name as Li told reporters.
Li said the blast happened shortly after 1 p.m. as he queued to apply for a US visa to take an exam in Los Angeles.
A police SUV appeared to have been damaged, with its back windshield missing, and was cordoned off by police before being removed, a Reuters witness said.
The embassy resumed normal operations at about 1.45pm., it said.
Crowds were still queueing outside the embassy after the explosion, and traffic was moving as normal in an area of northeastern Beijing that is home to numerous embassies including those of France, India and Israel.
Postings on social media showed pictures of smoke close to where people line up outside the compound for visa appointments. Some video clips and images were later removed.
Li Shaohui, a 58-year-old sanitation worker, said he felt the ground shake and that some people screamed.
"I thought first there was a big car crash," Li told Reuters, adding that the smoke had cleared quickly.
There was no damage to US embassy property, the embassy said. Staff members at the Indian and South Korean embassies said they were unaware of any unusual incident and were working as normal.
The state-run Global Times reported separately, citing witnesses, that police took away a woman who sprayed herself with gasoline in a suspected self-immolation attempt outside the embassy at around 11 a.m. It was not clear whether this woman's actions were related to the later explosion, the paper said.
A witness who did not want to be identified told Reuters that he saw a middle-aged woman with two buckets of gasoline. On her back were the Chinese characters for "sue them".
Beijing police and the US embassy did not immediately reply to a request for comment on the woman.
Security in the Chinese capital is tight and protests are often quickly disbanded. Violent crime rates are low in China, according to official statistics.