HONG KONG — A Myanmar judge on Monday found two Reuters journalists guilty of violating a colonial-era secrets law and sentenced them to seven years in prison after a months-long trial that was widely seen as farcical and a severe blow for press freedom in the country.

Wa Lone, 32, and Kyaw Soe Oo, 28, were detained in December in what has been described by defense attorneys and press watchdogs as a case of entrapment.

They were charged with a violation of the Official Secrets Act, a colonial-era law that the watchdogs say has been used to muzzle independent reporting and carries a maximum of 14 years in prison. At the time of their arrest, the two were reporting on the killing of 10 Rohingya Muslim men and boys in a village in Myanmar’s Rakhine state. 

In a statement announcing his ruling, Ye Lwin, the judge presiding over the case, said the two journalists possessed “top secret documents” and planned to share them with others, including insurgent groups in Rakhine.

Khin Maung Zaw, an attorney for the pair, described the assertion as ridiculous but said the government’s message was clear: “Hold your tongues, don’t say anything, don’t be inquisitive.”

Defense attorneys will appeal the decision, he said.

The journalists have pleaded not guilty and have repeatedly said they were merely doing their jobs.

As the judge read his statement and the verdict, Chit Su Win, Kyaw Soe Oo’s wife, leaned into the lap of the person next to her and sobbed.

“I really expected that they would be released and we’d return home together,” said Chit Su Win, speaking to reporters.

After the ruling, Kyaw Soe Oo told reporters: “We do not agree with the ruling. We did what we had to do as journalists.”

He added: “To my family members, please stay strong for us, as we are not giving up.”

The verdict prompted widespread condemnation from the international community and human rights groups. 

“The clear flaws in this case raise serious concerns about rule of law and judicial independence in Myanmar,” the U.S. Embassy said a statement, calling the verdict a “major setback” in expanding democracy in the country. 

Speaking after the verdict, Kevin Krolicki, Reuters Asia regional editor, said it was a “dark moment and a deeply disappointing result.” In a statement, Stephen J. Adler, Reuters editor in chief, said the decision was a “major step backward in Myanmar’s transition to democracy.”

Myanmar’s government, Kro­licki said, still has an opportunity to “do the right thing” and free the journalists. In Myanmar, the president’s office has the power to pardon those convicted of a crime. 

Myanmar’s president, Win ­Myint, was handpicked for the job by de facto leader and Nobel laureate Aung San Suu Kyi. She wields power over the civilian government, and observers say that any decision to pardon the two would probably come from her. However, Suu Kyi has not spoken up for press freedom or for the two journalists. 

In a June interview with Japanese broadcaster NHK, she said that they were arrested “because they broke the Official Secrets Act” and that their case has gone on in “accordance with due process.”

In private, she has been more stark. When Bill Richardson, a former U.S. ambassador to the United Nations and governor of New Mexico who is a friend of Suu Kyi, brought up the journalists’ case in his role as a member of an advisory commission her government formed, she “exploded” at him, he said in an interview.

“She responded with anger, referring to the journalists as traitors,” Richardson said in a statement Monday.

The case and its verdict have been widely condemned by critics in the international community who see them as evidence that journalists remain vulnerable and potential targets in Myanmar despite the political changes of the past several years. U.S. officials, including Secretary of State Mike Pompeo and Nikki Haley, ambassador to the United Nations, have called for the journalists’ release and for all charges against them to be dropped.

Myanmar has responded harshly to those who challenge the official narrative that government forces were simply responding to militants by embarking on a massive operation in ­Rakhine in August 2017, sending almost 900,000 mostly Rohingya Muslims fleeing to Bangladesh. 

U.N. report last week asserted that the military’s actions were genocidal and called on Myanmar military leaders, including the commander in chief, to be investigated and prosecuted for war crimes and crimes against humanity. 

Police officers asked the Reuters journalists to meet them over dinner on Dec. 12, when they were handed rolled-up documents. Shortly after they left the restaurant, the two said, they were stopped by other officers and accused of obtaining secret documents. 

Their lawyers say the case has highlighted deep flaws in Myanmar’s judicial system. The prosecution’s case has been peppered with inconsistencies, including a police officer’s testimony that he burned his notes from the time of the arrest. Another officer testified that he was instructed by his superiors to trap one of the reporters, Wa Lone.

“Everybody can now see, this is Myanmar,” said Khin Maung Zaw, the defense lawyer.

The day before the verdict, dozens of journalists and activists marched through Yangon, Myanmar’s most populous city, demanding the release of the two journalists and calling for press freedom. But Wa Lone and Kyaw Soe Oo have also been labeled by their fellow countrymen as traitors who sold out Myanmar’s military and their country in favor of Rohingya Muslims, a widely hated group in the country. 

Their families have faced intimidation, and the pair have been subjected to slurs and threats on Facebook

“The right to freedom of expression is not guaranteed — it is conditional on not challenging the government or the military, on not crossing their red lines,” said Thomas Kean, Wa Lone’s former editor at the Myanmar Times and editor in chief of Frontier Myanmar, an English-
language magazine. “If you do, they will go after you, and there are always laws on hand that can be dusted off and used.”

Kyaw Ye Lynn reported from Yangon, Myanmar.