BANGKOK (AGENCE FRANCE-PRESSE) - Thailand's junta is mulling a new cyberlaw that would grant the authorities the power to access any private sector computer system, a tool they say is needed to defend against hackers.

The Bill was proposed after the massive WannaCry cyber attack sparked havoc in computer systems worldwide, but it is controversial because Thailand has previously adopted cyberlaws that have been used as a cudgel against government critics.

The new law proposes setting up a National Cyber Security Committee which would be chaired by Prime Minister Prayut Chan-o-cha, a former army chief who seized power in 2014 and has stamped down on dissent.

The committee would oversee cyber defence capabilities and would be authorised to access any private company or citizen's computer with a court order.

During "national emergencies", when the authorities have to move quickly, the Bill proposes a court order would not be necessary and could be obtained retroactively.

"Officials must get court approval before accessing private company data. They cannot do so without a court warrant, unless it is a case of an emergency," Major-General Pisit Pao-in, a member of the committee that drafted the law, said.

"An emergency would mean a threat that is imminent against a large section of society or one that endangers the country," he added.

Maj-Gen Pisit said it was "coincidence" that the Bill was made public the same week as the WannaCry attack.

But he said that type of widespread global malware hack would constitute the kind of national emergency that could trigger the government to use their powers.

Thailand already has highly restrictive web laws, which critics say damages the junta's stated desire to turn the country into a regional digital hub.

Top of the list is the country's broadly worded 2007 Computer Crimes Act.

It was originally envisioned as a tool to stamp out Internet scams by banning the uploading of false or misleading information online.

But it has since been wielded with increased regularity against critics or people who speak out against wealthy companies and figures.

The junta passed a strengthened version of the law last December which also banned uploading "immoral" content and gave the authorities wider surveillance powers.

The country also retains a ferociously enforced royal defamation law that bans criticism of the monarchy.

More than 100 people have been charged with it since the coup, many for comments they make online, with some jailed for decades.

The Thai Netizen Network, which advocates for greater cyber freedoms, criticised the proposed cyber security Bill.

"The real purpose is to control Internet communication and social media to suppress government critics and to cover up failures and corruption by those who are in power," the group said in a Facebook post.