Japan has taken a big step towards enacting legislation for a policy shift that would allow troops to fight abroad for the first time since the Second World War Two, part of the prime minister's agenda to loosen the limits of a pacifist constitution.

The security policy shift, which Shinzo Abe says is vital to meet challenges such as a rising China, has sparked protests and sharply eroded his popular support.

Opponents argue it violates the constitution and fear it could ensnare Japan in US-led conflicts.

Ruling Liberal Democratic Party member Masahisa Sato said an upper house panel had approved the bills after a chaotic session, carried live on television, in which opposition lawmakers tried physically to block the vote, saying the vote was unacceptable.

The prime minister's ruling bloc has a majority in the full upper house but opposition parties have pledged to use delaying tactics to try to keep the bills from passing before parliament adjourns next week.

Thousands of demonstrators rallied near parliament chanting "Scrap the war bills" and "Abe resign".

The protests were reminiscent of those that forced Mr Abe's grandfather, Nobusuke Kinship, to resign 55 years ago after forcing a US-Japan security treaty through parliament.

The revisions will end a decades-old ban on defending a friendly nation under attack, or collective self-defence, when Japan faces a "threat to its survival".