BANGKOK — Thailand’s ruling military junta ordered Monday that national security cases be judged in civilian courts, two years after placing such matters in military courts.

More than 1,800 civilians had been brought before military tribunals through May this year, according to the legal aid group Thai Lawyers for Human Rights. Civilian jurisdiction will only apply to new cases; those already being processed will stay in the military courts.

Rights groups had strongly criticized holding military trials of civilians.

The junta had 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 war weapons and violations of the junta’s orders.

The return of such cases to civilian courts 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.

The decree explained that the action was taken because calm and stability had been restored, as evidenced by the peaceful holding of a referendum in August that approved a new constitution backed by the military. The new charter, which critics charge places limits on the power of elected politicians, is supposed to lead to a general election late next year.