“Today’s ruling is yet another injustice among many inflicted upon Wa Lone and Kyaw Soe Oo,” the editor in chief of Reuters, Stephen J. Adler, said in a statement. “They remain behind bars for one reason: those in power sought to silence the truth. Reporting is not a crime, and until Myanmar rights this terrible wrong, the press in Myanmar is not free, and Myanmar’s commitment to rule of law and democracy remains in doubt.”

During their trial, the two men described how in December 2017 they had been urgently called to a meeting with a police official who, after eating dinner with them, handed them a newspaper with documents rolled up inside. They were arrested immediately afterward.

The documents, along with phone numbers and files from the journalists’ phones and homes, became key pieces of evidence against them. One witness said the materials were public at the time of the arrest, and a police captain even testified that the actions against the men were a setup. That captain, U Moe Yan Naing, was later punished with a year in prison for violating police disciplinary rules.

The judge found that the journalists had possessed secret materials that they intended to publish, which could harm the state. Myanmar’s High Court ruled on Friday that their seven-year sentence was appropriate.

Human rights advocates said the appeals process repeated the shortcomings of their trial.

“The case against these two journalists should never have proceeded, much less resulted in a conviction,” Phil Robertson, the deputy Asia director for Human Rights Watch, said in a statement. “The appeals court process looks like it was just a rerun of the previous injustice done to these two reporters who dared investigate what the military wanted to keep hidden.”

Mr. Wa Lone and Mr. Kyaw Soe Oo were described by colleagues as idealistic young journalists who had embraced Myanmar’s expanding freedoms to report on important stories, including a violent campaign by the country’s military and Buddhist mobs against the primarily Muslim Rohingya ethnic group in the country’s northwest.

Mr. Wa Lone had obtained detailed information about the massacre of 10 Rohingya when he had been called to the meeting with police. Mr. Kyaw Soe Oo, who had recently joined the news organization, joined the meeting that led to their arrests, Reuters said.