YANGON, Myanmar — In the first significant ruling in favor of two jailed Reuters reporters, the judge in the case announced Wednesday that he would accept evidence from a police captain who testified that an officer was ordered to entrap one of the journalists.

Both sides in the closely watched case appeared caught off guard by the ruling of the judge, U Ye Lwin, who had previously sided with the prosecution in allowing the case to proceed. The judiciary in Myanmar is not known for its independence.

“Today, the court has proved itself as a court of justice, and it’s a big step,” said Khin Maung Zaw, the defense lawyer.

The police captain, Moe Yan Naing, has already paid a price for his testimony on April 20 that went against the prosecution. Since then, he has been sentenced in secret to a year in prison for an unspecified violation of the police disciplinary code, and his family was evicted from police housing.