Japan passed a controversial anti-terror law on Thursday that sparked street protests and warnings from critics that it would stomp on citizens' privacy rights and lead to over-the-top police surveillance.
The upper house of parliament passed the conspiracy bill early Thursday morning after a full night of debate by sleepy parliamentarians and unsuccessful efforts on the part of Japan's weak opposition to block it.
Thousands of demonstrators protested outside the legislature over the bill which criminalises the planning of serious crimes.
The government argues it is necessary to prevent terrorism ahead of the 2020 Olympic Games in Japan's capital.
But rights groups, Japan's national bar association and numerous academics have opposed the bill, saying it is so broad it could be abused to allow wiretapping of innocent citizens and threaten privacy and freedom of expression guarantees in the constitution.
US surveillance whistleblower Edward Snowden and Joseph Cannataci, UN special rapporteur on the right to privacy, have both criticised the law.
Recent polls show the public is divided on the issue.
The bill's passage overcame the opposition's no-confidence motion against Prime Minister Shinzo Abe's cabinet and a censure motion aimed at Justice Minister Katsutoshi Kaneda.
Tokyo insists the law -- which calls for a prison term of up to five years for planning serious crimes -- is a prerequisite for implementing a UN treaty against transnational organised crime which Japan signed in 2000.
"We will uphold the law in an appropriate and effective way to protect people's lives," Abe told reporters after the legislation passed.
"Three years ahead of the Tokyo Olympic and Paralympic Games, we hope to cooperate with the international community to prevent terror," he added.
- 'Forced vote' -
The bill was revised several times over the years as earlier versions met with fierce resistance and never made it through parliament.
The latest bill reduced the number of targeted crimes to over 270 offences and narrowed the definition of terrorist and criminal organisations.
Earlier versions of the law targeted more than 600 crimes unrelated to terrorism or crime syndicates.
Critics argued, however, that the current law still gives police and investigators too much leeway.
The general public could be targeted on conspiracy charges via monitoring phone and online conversations once they are suspected of being a member of criminal group, they warned.
The opposition chastised Abe for trying to push the law through quickly, as he faces mounting criticism over allegations that he gave friends special consideration in a couple of unrelated business deals.
"This is an ultimate form of forced vote -- it shut down sensible debate in the upper house," Renho, head of the leading opposition Democratic Party who goes by one name, told reporters.
The opposition has warned that petty crimes could fall under the scope of the law, and mocked Japan's justice minister when he earlier conceded that, hypothetically, mushroom hunting could be targeted if the fungi were stolen to raise money to fund terrorism.
"This legislation is a serious violation of the constitution," said Kazuo Shii, head of the Japanese Communist Party, the second-largest opposition party.
Some Japanese media have likened the bill to the World War II-era "public order maintenance law" under which ordinary people were arrested for political offences, exercising labour rights and anti-war activities.