MAE SAI, Thailand — A Myanmar judge on Monday charged two Reuters journalists who were covering the Rohingya crisis with violating the country’s colonial-era secrets act. The two will go to trial in what has been a closely watched test of press freedoms in the country, drawing condemnation from foreign governments and media watchdogs.

Wa Lone, 32, and Kyaw Soe Oo, 28, were charged with breaking the country’s Official Secrets Act, an offense punishable by up to 14 years in prison. They were arrested in December and accused of obtaining secret documents while reporting on the killing of 10 Rohingya boys and men in Myanmar’s western Rakhine state. 

Judge U Ye Lwin said the men have been charged with “getting, collecting and transferring secret documents regarding operations of the [Myanmar] police force.” 

The charging decision means they will now be brought to trial, dragging out the case for several more weeks. It could be months before a decision is reached on their guilt and sentencing. The two journalists entered a plea of not guilty. 

“If the judge wanted to, he could drop the charges, as one of the major witnesses testified that the journalists were entrapped,” said Khin Maung Zaw, the men’s attorney. “But since he made his decision, we are going to defend that they acted ethically to uncover unlawful acts in Rakhine state.”

Zaw Htay, spokesman for the government of Myanmar, also known as Burma, did not respond to a request for comment Monday. He said in response to previous requests that the court would make its decision according to “the rule of law” and that the government has assured that the pair will be able to defend themselves in fair court hearings. 

Stephen Adler, editor in chief and president of Reuters, said, “These Reuters journalists were doing their jobs in an independent and impartial way, and there are no facts or evidence to suggest that they’ve done anything wrong or broken any law. . . . Today’s decision casts serious doubt on Myanmar’s commitment to press freedom and the rule of law.”

Attorneys for Wa Lone and Kyaw Soe Oo say they were entrapped by police officers, broke no laws and were simply doing their jobs as reporters. The two journalists were invited by police officers to a meeting Dec. 12 at a restaurant in Yangon, where they were handed papers that allegedly linked security forces to an attack on Rohingya Muslims in Rakhine state. 

The journalists say they were then almost immediately arrested, held incommunicado for two weeks and accused of “illegally obtaining” confidential documents.

Central to the defense’s arguments is police Capt. Moe Yan Naing, who testified in court that he was ordered to “trap” Wa Lone by handing him the documents as a pretext for arrest. Kyaw Soe Oo accompanied Wa Lone to the meeting. The officer has since been sentenced to a year in prison for violating the police force’s disciplinary code, and his family was evicted from their home in what the government said was an unrelated matter. 

Media organizations and the international community see the closely watched case — packed with contradictions, conflicting accounts by police officers and absurd moments as a litmus test for press freedom in Myanmar.

Article 19, a British press freedom watchdog, denounced the decision, saying it “casts doubt” on the judiciary’s independence and makes it complicit in the government’s long-standing efforts to block reporting on the Rohingya crisis in Rakhine state.

“Wa Lone and Kyaw Soe Oo deserve praise not persecution, and yet they face longer sentences than the soldiers who committed the crimes they were reporting,” said Matthew Bugher, the group’s Asia representative. “The government has made investigative journalism one of the most dangerous professions in the country.”

As the judge delivered his ruling, relatives and friends of the pair looked almost resigned to the news, having watched their loved ones shuttling back and forth, handcuffed and flanked by police officers, for almost seven months. Before he was dragged away by officers, Kyaw Soe Oo exchanged words with his daughter, a toddler, who had been waiting behind a barbed-wire barrier before the court hearing to try to catch a glimpse of her father.

Wa Lone, who has become known for his resilience and optimism during the course of the proceedings, was photographed with a signature two thumbs-up gesture as he entered the Yangon court.

Speaking after the court session, Wa Lone said that the men were investigating human rights violations committed in Rakhine state — their jobs as reporters.

“We did nothing wrong and nothing unethical,” he said.

Kyaw Ye Lynn reported from Yangon.