Media playback is unsupported on your device Media caption The BBC's Yalda Hakim: "Scenes like these are unprecedented in Japan"

Thousands of people have protested outside of Japan's parliament against new legislation that would allow the military to deploy overseas.

The changes would allow Japanese troops to fight abroad for the first time since World War Two.

The legislation has already been passed by Japan's lower house and is expected to be endorsed by the upper chamber.

Under its constitution, Japan is barred from using force to resolve conflicts except in cases of self-defence.

But a reinterpretation of the law will now allow "collective self-defence" - using force to defend allies under attack.

Police are lining the streets and telling protesters to move along in an attempt to minimise disruption in the capital's centre.

At the scene: Yalda Hakim, BBC News, Tokyo

Image copyright EPA Image caption The Japanese are not normally so vocal

Despite the wet weather conditions, tens of thousands of protesters poured out onto the streets demanding that their pacifist constitution be protected and calling for the prime minister to step down.

The streets were lined with police vans but given how unprecedented it is for the Japanese to be so vocal, there was never any fear that things would get out of hand.

These demonstrations have been taking place all summer, mainly led by students and young people who say they wish to protect Japan's pacifist constitution.

They are often accused of being apolitical and apathetic but it appears they have woken up and are refusing to be silenced.

Prime Minister Shinzo Abe says the changes are necessary to protect Japan, but polls show many Japanese oppose them.

The plan was criticised at a recent memorial ceremony commemorating the dropping of a US atomic bomb in August 1945 on the city of Nagasaki, which killed 70,000 people.

One survivor of the attack, 86-year-old Sumiteru Taniguchi, said he could not accept Mr Abe's new legislation.

Mr Abe has previously said that the change would not lead to involvement in foreign wars.

What is collective self-defence?

Image copyright AFP

Japan's post-World War Two constitution bars it from using force to resolve conflicts except in cases of self-defence.

Mr Abe's government has pushed for a change that would revise the laws such that Japan's military would be able to mobilise overseas when these three conditions are met:

when Japan is attacked, or when a close ally is attacked, and the result threatens Japan's survival and poses a clear danger to people

when there is no other appropriate means available to repel the attack and ensure Japan's survival and protect its people

use of force is restricted to a necessary minimum

What's behind Japan's military shift?