A police officer escorts an anti-Japanese protester out from the restricted area in front of the Japanese Consulate General in Shanghai (AP)
Protests against Japan for its control of disputed islands has spread across more than a dozen cities in China and turned violent at times, with protesters hurling rocks at the Japanese Embassy and clashing with Chinese paramilitary police before order was restored.
Thousands of protesters gathered in front of the embassy in Beijing. Hundreds tried to storm a metal police barricade but were pushed back by riot police armed with shields, helmets and batons.
A few made it through but were quickly taken away by plain clothes police. Protesters also threw rocks and burned Japanese flags.
Zhang Zhong, a 32-year-old computer worker, said the Chinese should stand up against Japan, remembering its brutal occupation of much of China before and during the Second World War.
"We cannot lose the Diaoyu Islands," he said. "We cannot forget our national shame."
Protests were more orderly in most other cities, though in the southern city of Changsha protesters smashed a police car made by Mitsubishi, a Japanese brand, according to online reports.
Anti-Japanese sentiment, never far from the surface in China, has been building for weeks, touched off by moves by Tokyo and fanned by a feverish campaign in Chinese state media.
Passions grew more heated this past week after the Japanese government purchased the contested East China Sea islands from their private Japanese owners.
Although Japan has controlled the uninhabited islands - called Diaoyu in Chinese and Senkaku in Japanese - for decades, China saw the purchase as an affront to its claim and as further proof of Tokyo's refusal to negotiate over them.
Beijing lodged angry protests and tried to bolster its claim by briefly sending marine surveillance ships into what Japan says are its territorial waters around the islands and by ratcheting up state media coverage.