An East Timor court on Thursday dismissed a criminal defamation case brought by the country's prime minister against two journalists due to lack of evidence.

Rights groups and press advocates had urged that the case be dropped, fearing it would further undermine press freedom in one of the world's youngest democracies.

Accused journalist Raimundo Oki said there was "big applause" when Dili District Court judge Patrocino Antonino Goncalves issued his ruling. The trial was observed by the International Federation of Journalists, USAID and other groups.

"I am happy with the final decision because since the beginning I have always believed that the judge will do his job freely and independently," Oki said.

Oki and his former editor at the Timor Post, Lourenco Vicente Martins, would have faced up to three years in prison if found guilty of slanderous denunciation.

The defamation accusation stemmed from an error in a story published two years ago about Prime Minister Rui Aria de Araujo's involvement in a state contract for information technology services when he was an adviser to East Timor's finance minister in 2014.

The story, which said Araujo had recommended a particular company for the contract before bids opened, misidentified that company as the eventual winner of the contract.

The newspaper apologized for that error, published a front-page story on Araujo's denial and Martins resigned. But Araujo has insisted on prosecuting. East Timor's fragile press freedom has come under attack with the passing of a restrictive media law in 2014 that can be used to stifle investigative journalism.

A former colony of Portugal, it was occupied by Indonesia for a quarter century until a U.N.-sponsored independence referendum in 1999 sparked violent reprisals by the Indonesian military that killed many and destroyed its economy.