Japan has experienced its biggest anti-war protests in more than 50 years as politicians set about revising the country's pacifist stance.
The Japanese parliament has passed a controversial law allowing the country's armed forces to fight overseas for the first time since the end of World War II.
A vote on the new law was delayed for several hours as the opposition tried to stop the measure coming into force and scuffles broke out in parliament amid wrangling over the bills.
Under the name of "collective self defence", the law change allows actual combat under certain conditions.
Outside parliament, demonstrators rallied in a last-ditch show of protest.
Tens of thousands of protestors have been fighting the drastic change in military policy for some time.
Many Japanese are attached to the pacifist provisions in the constitution which banned fighting overseas.
The bills, which had already passed through the government-dominated lower house, were agreed with 148 lawmakers voting in support and 90 against.
More than 200 hours were spent deliberating the legislation, the Japan Times reported, and its approval by parliament fulfils one of Prime Minister Shinzo Abe's long-held ambitions.
What is collective self-defence?
Japan's post-World War II constitution bars it from using force to resolve international conflicts except in cases of self-defence.
Mr Abe's government has pushed for security legislation that would allow Japan's military to mobilise overseas when 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
Asia strategist Keith Henry said Mr Abe wanted Japan to play a proactive role in regional security to counter potential threats from China and North Korea.
The United States has been pushing Japan for years to expand the role of its military.
- CNN, BBC