A judge in Myanmar ruled on Monday that two jailed Reuters reporters would face trial, a decision widely seen as a setback for free speech in a country led by the onetime democracy icon Daw Aung San Suu Kyi.

The judge’s decision to charge the reporters with obtaining state secrets dashed any lingering hope that the reporters might be freed without having to go on trial. The reporters, Wa Lone, 32, and Kyaw Soe Oo, 28, face up to 14 years in prison under Myanmar’s colonial-era Official Secrets Act, and their case had been in a pretrial phase since their arrest in December.

Monday’s ruling will almost certainly provoke further international condemnation of Ms. Aung San Suu Kyi, a Nobel Peace Prize laureate whose government took over from a repressive military junta, but who has herself been widely accused of failing to protect domestic press freedoms or to stop the ethnic cleansing of the country’s Rohingya Muslim minority.

In a statement on Monday, Stephen J. Adler, the president and editor in chief of Reuters, called the case against the reporters a “protracted and baseless proceeding,” adding that the decision “casts serious doubt on Myanmar’s commitment to press freedom and the rule of law.”

“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,” Mr. Adler said in the statement. “They should be released and reunited with their families, friends, and colleagues.”

The Trump administration, which has been accused by critics of emboldening the repression of journalists through denunciations of news coverage it dislikes, also criticized the Myanmar judge’s decision.

“Journalists not only keep citizens informed but they hold leaders accountable,” Nikki R. Haley, President Trump’s ambassador to the United Nations, said in a statement. Ms. Haley called for the release not only of the journalists, but also of a police captain detained after he testified to their innocence, “raising further serious concerns about rule of law” in Myanmar.

Mr. Wa Lone and Mr. Kyaw Soe Oo were arrested in December while they were in far-western Rakhine State investigating the September massacre of 10 civilian members of the persecuted Rohingya ethnic group.

The massacre occurred during attacks on the Rohingya by Myanmar’s army and Buddhist mobs — violence that drove hundreds of thousands of refugees into Bangladesh and has been widely characterized as ethnic cleansing.

The reporters have vowed to fight the charges, and Mr. Wa Lone said on Monday that he would not give up.

“I have the right to defense until the judge decides that I’m guilty,” he said outside the courthouse in Yangon, the country’s commercial capital. “We just investigated the violation in Rakhine state based on journalistic ethics. Injustice will never be able to win.”

A lawyer for the defense, U Khin Mg Zaw, said he did not expect the trial to take longer than two months. He said he was confident his clients would be released but that freedom of expression was under dire threat in the country.

The reporters are also represented by Amal Clooney, an international human rights lawyer.

“Press freedom in Myanmar hasn’t gotten any better than it was under the military government,” Mr. Khin Mg Zaw said, referring to the junta that ruled the country for decades before Ms. Aung San Suu Kyi’s party came to power in 2016 after winning a landslide election victory the year before.

The judge’s decision comes about four months after The United States Holocaust Memorial Museum revoked a prestigious human rights awardthat it had given to Ms. Aung San Suu Kyi in 2012.

Human rights groups have accused the Myanmar police of entrapping the two Reuters journalists by handing them incriminating documents.

In an interview last month with the Japanese broadcaster NHK, Ms. Aung San Suu Kyi said that the reporters were arrested not for covering what she called “the Rakhine issue,” but for breaking the Official Secrets Act. She said the decision on their guilt or innocence would be up to Myanmar’s judiciary.

“What is important is that we should be working in accordance with due process and rule of law,” she told NHK.

It would have been unusual if the judge in the case, U Ye Lwin, had sided with the defense. Still, the case has been widely seen as an important bellwether of whether media freedom still exists in the country.

“If the court chooses to press charges against Wa Lone and Kyaw Soe Oo, it will be a clear signal to the world that freedom of the press in Myanmar is in grave danger,” Summer Lopez, the senior director of free expression programs at PEN America, said in a statement last week.

On Monday, Matthew Bugher, the head of the Asia program at Article 19, a human rights group based in the United Kingdom, called the judge’s decision “a farcical miscarriage of justice.”

“Wa Lone and Kyaw Soe Oo took great personal risks to cast light on events largely hidden from the public’s view,” Mr. Bugher said in a statement. “Instead of dragging them through preposterous legal proceedings, the government should commend the journalists for their indispensable role in promoting accountability.”