Japan's controversial new state secrets law was condemned Saturday as "the largest ever threat to democracy in postwar Japan" by a group of academics, including two Nobel prize winners, reports said.

On Friday Japan's parliament adopted a new law handing out stiffer penalties for those who spill state secrets, despite a public outcry over fears the legislation was draconian and would impinge on press freedom and the public's right to know.

In a strongly worded attack on the new law, a group of 31 academics, including Nobel Prize winners Toshihide Maskawa and Hideki Shirakawa, accused the Japanese government of threatening "the fundamental human rights and pacifist principles" established by the country's constitution.

The controversial bill, proposed by the right-wing government of Prime Minister Shinzo Abe, was approved by the Senate on Friday evening, a few days after it was passed in the lower house.

The Senate vote in favour was expected as the coalition government led by Abe's Liberal Democratic Party (LDP) holds a majority of seats there.

The opposition raised motions to stop the law but each move was rejected by the LDP members and their allies.

The scholars' statement -- which Kyodo said was also endorsed by a further 3,150 academics -- condemned the country's ruling bloc of behaving in a way that was "reminiscent of the prewar government that wrested away freedom of thought and freedom of the press" by pushing the law through both Japan's legislative chambers.

Shirakawa was awarded the Nobel prize for chemistry in 2000 while Maskawa won the prestigious award for physics in 2008. The Kyodo report did not name any of the other academics who signed the statement.

The law allows government ministers to designate as a state secret information related to defence, diplomacy, counter-intelligence and counter-terrorism.

Abe has argued that the measure is necessary to plug a notoriously leaky government machine, which prevents its chief ally the United States from sharing intelligence.

But critics say the categories are so vague that almost anything could fit the definition. They worry that information that is embarrassing to governing politicians or to their patrons could easily be hidden from public view.

They point to the way that Tokyo withheld news of the severity of the nuclear disaster at Fukushima in 2011, and say a state that already operates largely behind closed doors will become even more secretive.

That problem is exacerbated by a relatively weak institutional press.

The bill allows for jail terms of up to 10 years for those convicted of leaking state secrets, as well as for those who acquire secrets through illegal means -- for example through trespass.

Anyone found guilty of encouraging someone to leak a state secret could face up to five years in jail, a provision that has drawn a chorus of protest from journalists, lawyers and academics.

More than 250 film celebrities, including animation directors Hayao Miyazaki and Isao Takahata, along with journalists, researchers, lawyers and other influential figures had appealed for making every effort to block the law which they criticised for being "anti-liberty, anti-democratic and dangerous".

The legislation does not provide for any independent oversight of the process.

Abe has said the government intends to set up panels to provide checks and balances in the process of defining a secret.

But opponents say nothing is written into the legislation and government-appointed panels are in any case unlikely to rule against their paymaster.