As the most widespread and violent anti-Japanese protests in decades erupted across mainland cities over the weekend, Beijing is walking a political tightrope in its tacit consent to public fury over the long-simmering tensions between China and Japan. Initially peaceful rallies in more than 50 mainland cities over the Diaoyu Islands dispute have turned ugly over the past two days, threatening to escalate into larger-scale protests over internal injustice and corruption. While hoping to vent public outrage over Japan, Beijing finds itself in a very delicate situation. The danger is that such strong nationalistic sentiments could backfire shortly before the once-a-decade leadership succession, say analysts. They said that with the anniversary of the September 18 memorial day, marking the start of Japan's invasion of China in 1931, just two days away, Beijing faces tricky choices. They are whether to continue to use nationalism as a strong unifying force or to contain the anger and violence that could be easily turned against itself. Professor Yuan Weishi, a historian at Sun Yat-sen University in Guangzhou, said the fact that unusually large protests broke out in so many cities suggested the heavy involvement of the government. "It would have been impossible to see spontaneous demonstrations across the country if the government did not give its tacit consent, to say the least," he said, noting that preventing mass gatherings has been a priority for mainland authorities. "This has put to the test the leadership's ability to manage international relations as well as control domestic tensions," Yuan said. Protesters, including many in the capital, carried pictures of Mao Zedong and in some cities unfurled slogans in support of disgraced Politburo member Bo Xilai. Some protesters in Guangzhou and Shenzhen displayed banners calling for political reforms and greater democracy - taboo topics on the mainland. Professor Zhu Lijia, from the Chinese Academy of Governance, warned that Beijing "must not underestimate the risk that the spasm of nationalist sentiment and blind patriotism can be turned against the government … if it continues to be seen as weak in dealing with Japan".