AFTER days of ill-tempered wrangling inside and vocal protests outside, the upper house of the Japanese Diet (parliament) passed a series of security bills on September 19th aimed at substantially modifying the way the country’s post-war pacifist constitution is interpreted. The vote, of 148 to 90, was pushed through by Shinzo Abe’s conservative coalition. It marks a significant break with the past that has caused both the prime minister’s popularity to plummet and outrage in China, but has been largely welcomed by Japan’s regional neighbours and allies (apart from South Korea). The main effect is to allow Japan’s Self-Defence Forces (SDF) to help America and its allies even if Japan is not under attack itself. Although the Diet will have to approve any deployments abroad—a concession by Mr Abe to get some smaller parties onside—it means that the long-standing bilateral security pact between America and Japan ceases to be a one-way street obliging the United States to defend Japan but not the other way round. It will also make it possible for Japanese troops to be sent on UN peacekeeping missions in more forceful roles. An interesting early test could come in South Sudan, where both Japan and China contribute to the UN effort. Under the new laws, the SDF could find itself fighting alongside Chinese soldiers should they come under attack.

Nonetheless, China has lambasted Mr Abe’s government. Within hours of the vote in the Diet, the Chinese Ministry of Foreign Affairs “solemnly” urged Japan “to learn hard lessons from history” and “to promote regional peace and stability, rather than the opposite.”

When the legislation was passed by the Diet’s lower house in July, China’s state-runnews agency, Xinhua, called it a “dark stain for Japan” that marked the country’s return to militarism. One commentator compared it to a samurai sword wielded by Mr Abe in “fatally slashing Japan’s seven decades of pacifism”. China has been careful to aim its fury at what it sees as the menacing nationalism of Mr Abe and his supporters, distinguishing them from the majority of Japanese people who it says have been “betrayed”.

China is right to remind Mr Abe that many of its citizens have neither forgiven nor forgotten the appalling brutalities his country visited on them during the second world war. But it seems oblivious to the impact its own military ambition is having on its neighbours, including Japan. China’s defence spending in real terms doubled in the five years to 2009, increased by nearly 50% in the five years after that and will rise by over 10% this year despite the slowing economy.

Japan is raising defence spending, too, but at nothing like the same clip (see chart). This year, its military budget has increased by 2% to ¥4.98 trillion ($42 billion) and next year will go up by 2% again. Although China’s defence outlay was officially $132 billion last year, SIPRI, a think-tank in Stockholm, estimates the real figure is $216 billion. Almost every other country in the Asia-Pacific region is also increasing its military spending. But they are doing so in response to China’s build-up and its hardline approach to the many territorial disputes it is involved in with its neighbours.