Thailand's ruling military junta has ordered that national security cases be judged in civilian courts, two years after placing such matters in military courts.

Rights groups had strongly criticized military trials of civilians.

The junta decreed soon after its May 2014 takeover from an elected government that military courts would judge national security cases, which included defamation of the monarchy, sedition, possession of explosives and violations of the junta's orders.

The restoration to civilian jurisdiction became effective Monday when a decree issued by junta chief and Prime Minister Prayuth Chan-ocha was published in the Royal Gazette. The junta can enact such decrees on its own under the temporary constitution implemented after the 2014 coup.