A strict new state-secrets law that critics charge will help conceal government misdeeds and limit press freedom has taken effect in Japan.

Waving banners and beating drums, hundreds of Japanese took to the streets of Tokyo to protest against the law, hours before it came into force on Wednesday.

The government of Prime Minister Shinzo Abe says the law, which was passed a year ago amid protests, is essential to convince allies led by the United States to share intelligence with Japan.

Critics counter that whistleblowing on government misdeeds will be chilled. Reporters Without Borders has called the law "an unprecedented threat to freedom of information".

It seems to allow Abe to do virtually anything by saying 'it's for the good of the country' without anybody knowing what they are actually doing. Hisako Ueno, protester

"This law will restrict the peoples' right to know," said Tomoki Hiyama, one of about 800 people braving frigid winds to gather in the shadow of Japan's parliament on Tuesday.

"It's full of ambiguity and will take us back to the 'public peace and order' controls of World War Two."

The law mandates prison terms of up to 10 years for public servants or others leaking state secrets, while journalists and others who encourage such leaks could be imprisoned for five years. Kyodo news agency said that about 460,000 documents would in effect immediately.

"The law says that the act of leaking itself is bad no matter what the circumstances," Yukiko Miki at Clearinghouse Japan, a non-profit organisation that promotes information disclosure, told the Reuters news agency.

Media concerns

Two watchdog groups are to oversee implementation of the law, one directed by the prime minister. Chief Cabinet Secretary Yoshihide Suga said the government would implement the law while assuring "the public's right to know isn't infringed".

Critics say Abe's government failed to keep a pledge to win public understanding of the law by not fully explaining how it will be implemented. The Cabinet Office solicited public comment for a month from late July until late August - during prime summer vacation time.

The Japan Newspaper Publishers and Editors Association sent a letter of concern to Justice Minister Yoko Kamikawa on Monday, saying: "It cannot be said that all our concerns have been alleviated."

The uncertainty about what the government will deem a secret was already having a repressive effect, Miki said. Her office has received calls from bloggers worried about whether they should delete posts to avoid prosecution.

"This is really too much," said Hisako Ueno, 60, a retired teacher at a Saturday protest. "It seems to allow Abe to do virtually anything by saying 'it's for the good of the country' without anybody knowing what they are actually doing."