A Chinese demonstrator climbs over the fence and chants slogans during an anti-Japanese protests outside the Japanese Embassy in Beijing.
This is amid growing tensions between Asia's two biggest economies over a group of disputed islands.
Paramilitary police with shields and batons barricaded the embassy, holding back slogan-chanting, flag-waving protesters who at times appeared to be trying to storm the building.
"Return our islands! Japanese devils get out!" some of the protesters shouted. One of them held up a sign reading: "For the respect of the motherland, we must go to war with Japan."
Protester Liu Gang, a migrant worker from the southern region of Guangxi, said: "We hate Japan. We've always hated Japan. Japan invaded China and killed a lot of Chinese. We will never forget."
As tensions escalated, and reports emerged of other protests around China, Japan said its foreign minister had cut short a visit to Australia, arriving back in Tokyo on Saturday morning to deal with the situation.
The long-standing territorial dispute escalated dramatically on Friday when China sent six surveillance ships to a group of uninhabited islets in the East China Sea, raising tensions between the two countries to their highest level since 2010.
Sporadic protests
China had sent the ships in response to the Japanese government's decision on Tuesday to buy the islands, which Tokyo calls the Senkaku and Beijing calls the Diaoyu, from a private Japanese owner despite Chinese warnings against doing so.
In Shanghai, streets around the Japanese consulate, in the western part of town, were cordoned off on Saturday. Hundreds of police let small groups of people in at a time to protest.
Japanese media said big anti-Japan protests were also being held in the Chinese cities of Xian, Suzhou, Changsha and Nanjing.
Pictures on China's popular Twitter-like site, Sina Weibo, showed hundreds of protesters marching down a street in the southwestern city of Kunming with banners and Chinese flags.
There have been sporadic protests around China throughout the week, although those in Beijing had been small and largely peaceful.
The dispute flared up last month after Japan detained a group of Chinese activists who had landed on the islands.
Diplomats say Tokyo and Beijing want to keep the row from spiralling out of control, but managing the situation can be difficult given that China is undergoing a leadership change, an election is looming in Japan and mutual mistrust runs deep.
Slapping their own mouths
The ruling Communist Party, which likes to project an image of stability, rarely permits protests to take place. While Beijing is under strong popular pressure to take a tough line with Japan, it will also be cautious not to let the protests spin out of control.
"I think the government is encouraging this," said one protester, who gave his name as Uda Hen.
"They could have stopped all of us approaching when we were at the subway station. The government has taught us to be anti-Japanese at school, so if they want us to stop it would be like slapping their own mouths," he added.
The influential Chinese tabloid the Global Times, published by Communist Party mouthpiece the People's Daily, said in an editorial on Saturday backing off was not an option for China.
"China should be confident about strategically overwhelming Japan," it wrote, saying the Chinese military should "increase their preparation and intensify their deterrence" against Japan.
"China will not shy away if Japan chooses to resort to its military," the widely-read paper added.
However, China has yet to send military forces into the seas around the islands.
Relations between Beijing and Tokyo chilled in 2010, after Japan arrested a Chinese trawler captain whose boat collided with Japanese Coast Guard vessels near the islands.
Sino-Japanese ties have long been plagued by China's bitter memories of Japan's military aggression in the 1930s and 1940s and present rivalry over resources and regional clout. Reuters