The lower house of Japan's parliament has approved two controversial bills that change the country's security laws, despite protests in Tokyo.
The changes would allow Japanese troops to fight overseas for the first time since World War Two.
The bills still need approval from the upper house, but many expect them to eventually be passed into law.
The changes are unpopular and thousands demonstrated outside parliament on Wednesday.
Prime Minister Shinzo Abe has pushed for the two bills, arguing it is necessary to expand the role of the military in a doctrine called collective self-defence.
But polls show more than half of Japanese citizens oppose them.
Reacting to the passing of the bills, China's foreign affairs ministry spokesman Hua Chunying questioned if Japan was "abandoning its pacifist policies", and urged Japan to "stick to the path of peaceful development" and avoid harming the region's stability.
South Korea has similarly in the past urged Japan to "contribute to regional peace and security" and called for transparency in Japan's defence policy discussions.
What is collective self-defence?
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
Most of the opposition lawmakers walked out of the lower house chamber in protest before the vote took place on Thursday, with only members of the small Japan Restoration Party voting against the bills.
Mr Abe's Liberal Democratic Party (LDP) and its coalition partners hold a two-thirds majority in the lower house, which is needed to approve bills.
The upper house, where the LDP and partners also hold a majority, now has 60 days to rule on the bills. Even if it rejects them, the bills would be sent back to the lower house which can then pass them into law.
How Japan's neighbours see the bills
China's People's Daily says the new bills, if passed into law, would become Japan's "historical shame". A front-page commentary accuses Japan of giving in to US pressure to do more for the US strategy of rebalancing Asian power, by playing a more active role in the US-Japan military alliance.
Beijing's Global Times says that Shinzo Abe, "drunk on his own 'ideals'", has miscalculated. "China is Japan's imaginary enemy, but fighting China is not a risk that Japan can bear... as China is capable of dealing Japan a fatal blow."
The official party paper in North Korea, Nodong Sinmun, sees more sinister motives. It says the bills are an attempt to turn Japan into a militarist state by stealth. "If Japan makes desperate efforts to reinvade other counties by invoking the war law, this will bring disasters to its people," it warns.
South Korea's foreign ministry, quoted by Yonhap news agency, says Japan should "stick to the spirit of the pacifist constitution".
But the BBC's Rupert Wingfield-Hayes says that the opposition is expected to launch legal challenges to rule the bills as unconstitutional.
Our correspondent says those in Japan who oppose the bills believe they break Japan's explicitly pacifist constitution and also distrust Mr Abe, who is known for his right-wing nationalist views.
Organisers of a large protest which took place outside parliament on Wednesday night said about 100,000 people showed up.
"I'm angry at both the new security bill and Prime Minister Abe. The bill is against Japan's constitution... Abe does not understand it," student Jinshiro Motoyama told the BBC.
Mr Abe first put the changes in motion last year when he sought to reinterpret Japan's pacifist constitution to allow the bills.