Updated

Protests against Japan for its control of disputed islands swelled across more than a dozen cities in China and at times turned violent Saturday, 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 plainclothes police. Protesters also threw rocks and burned Japanese flags.

Protests were more orderly in most other cities, though in the southern city of Changsha protesters smashed a police car made by Mitsubishi, according to reports online.

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 owners. Though 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 claims and as further proof of Tokyo's refusal to negotiate over them.

In response, Beijing has lodged angry protests and tried to bolster its claims by briefly sending lightly armed marine surveillance ships into what Japan says are its territorial waters around the islands and by ratcheting up state media coverage. Some news programs featured explanations of historic documents and bellicose commentary.

Smaller demonstrations had been staged throughout the week. But they boiled over Saturday, especially in Beijing. Outside the Japanese Embassy, the protesters -- most of whom appeared to be students -- shouted slogans demanding Japan relinquish the islands and claiming China's ownership of them. The crowd grew larger than expected, prompting police to close off a main thoroughfare to traffic.

In Shanghai, about 200 police officers kept order, cordoning off the street leading to the Japanese Consulate and allowing protesters in groups of 100 to approach the consular building. Protesters had to register with police before they could cross the cordon and had to take their banners with them when they left.

The demonstrations came before an anniversary Tuesday that often sees anti-Japanese sentiment: the 1931 Mukden incident, which marked a step in Japan's conquest of Manchuria and onward to much of China in the 1930s and World War II. Activists have called for demonstrations Tuesday.

The uptick in Chinese anger over the disputed islands comes even though the Japanese government hoped its purchase would calm, rather than inflame the situation. Tokyo's nationalistic governor, Shintaro Ishihara, proposed buying the islands in April and planned to develop them -- something that Beijing would have seen as an attempt to solidify Japan's claim. By purchasing them instead, the Japanese government has promised to keep them undeveloped.