Thousands of demonstrators have surrounded Japan’s parliament after the Lower House passed controversial security bills that critics say will dramatically change the country’s defence posture and hollow out its pacifist constitution.

Most members of Japan’s opposition parties walked out of the chamber in protest before the vote Thursday afternoon. But the coalition government’s two-thirds majority meant they were easily approved.

Prime Minister Shinzo Abe wants Japan’s armed forces to join in military activities abroad and defend allies under attack - principally the United States - a policy he has dubbed “proactive pacifism.”

“The security environment surrounding Japan continues to get tougher,” Mr Abe said after the vote. “These bills are absolutely necessary to protect the lives of Japanese people and prevent wars.”

But the attempt to legislate for “collective defence” has united most constitutional scholars against his government and triggered deep divisions in a country where pacifism sunk deep roots after the second world war.

Campaigners are calling for 100,000 people to surround the Diet (parliament) every night over the coming days in a bid to halt the bills and force Mr Abe’s resignation.

“I cannot forgive how the government forced these bills through,” said Mari Saito, who protested on Thursday night with her young daughter. “Maybe it’s too late now but I wanted to tell my child that I tried to stop them.”

Public backing for the government has dipped this week below 40 per cent for the first time since Mr Abe called a snap election last year, according to several polls. A survey by public broadcaster NHK found only 18 per cent of the population support the new legislation.

Conservatives in Mr Abe’s Liberal Democratic Party (LDP) say the constitution, written in 1946 during the American occupation of Japan, has kept the country weak and emasculated. They want to scrap Article 9, which “forever renounces war” as a sovereign right.

One aim is to achieve “inter-operability” with US forces, to meet new guidelines adopted during a visit by Mr Abe to Washington in April. Currently, almost anything Japan’s military wants to do has to get temporary legislation from the Diet.

To rewrite the article, however, the government needs a two-thirds majority of both parliamentary houses, followed by a national referendum - a hurdle that has defeated every previous administration.

Mr Abe reinterpreted the clause last July, triggering a backlash from constitutional experts. An academic group campaigning against the legislation has collected the support of more than 9,000 scholars.

The prime minister is attempting a “constitutional coup d’etat”, said Jeffrey Kingston of Temple University, Japan Campus. “Knowing he can’t revise the constitution because he doesn’t have the numbers to do so, Abe is gutting Article 9 constraints on the Japanese military.”

Many ordinary Japanese are concerned, he said, that new defence guidelines with America, agreed this year, will drag Tokyo into a conflict with China - at US behest. “Hardly anyone here wants to become Washington’s deputy sheriff in Asia.”

Mr Abe faces the toughest political fight of his career in the coming weeks. The government’s two-thirds majority in the lower chamber means the bills could become law, even if rejected in the upper house. But Mr Abe needs political legitimacy if he is going to eventually send Japanese troops into harm’s way.

The LDP’s coalition partner, the Buddhist-backed Komeito, has millions of pacifist followers who could vent their disapproval. Students, peace activists and trade unions have vowed to fight the bills before they become law.

In the meantime, a long hot political summer dominated by painful war anniversaries, looms. Japan marks 70 years since the end of the second World War next month.