Tokyo: Japan`s parliament passed contentious security bills into law in the early hours of Saturday, in a move that could see Japanese troops fight abroad for the first time in 70 years.

Lawmakers approved the bills to ease restrictions on the country`s tightly controlled military, while outside thousands rallied in a last-ditch show of opposition to laws they fear could fundamentally reshape the proudly pacifist nation.

The changes, which would allow Japanese troops to fight in defence of allies, have drawn tens of thousands of people from across society onto the streets in almost daily protests, in a show of public anger rarely seen on such a scale.

President of the upper house Masaaki Yamazaki said the bills passed with 148 lawmakers voting in favour, compared to 90 against, after hours of tense debate.

Outside parliament large crowds, which police estimated at around 11,000, called for the prime minister to step down, shouting: "Protect the constitution."

Nationalist Prime Minister Shinzo Abe says the changes are a normalisation of Japan`s military status, which has been restricted to self-defence and aid missions by a pacifist constitution imposed by the US after World War II.

He and his backers say the laws are necessary because of threats from an increasingly belligerent China and unstable North Korea.

Opponents argue they go against both the constitution and the national psyche, and could see Japan dragged into American wars in far-flung parts of the globe.