Ecuador's President Rafael Correa has pardoned the owners and a journalist at El Universo newspaper who faced jail terms and $40m (£25m) in damages for libelling him.
President Correa, in a statement transmitted live, said he and his government had been portrayed as the persecutors of journalists.
But his sole aim in bringing the case had been to seek the truth, he said.
The libel case focused attention on the freedom of Ecuador's media.
"I've decided to... pardon the accused and grant them remission of the sentences they rightly received," Mr Correa said in his statement.
The three owners of El Universo - brothers Carlos, Cesar and Nicolas Perez - and columnist Emilio Palacio were found guilty of libelling the president.
They were each given three-year prison terms and had multi-million dollar damages and fines awarded against them.
Mr Correa brought the lawsuit after an article in El Universo questioned an army raid to rescue him from a violent protest by striking police officers in September 2010.
Carlos Perez is currently sheltering in the Panamanian embassy in the capital, Quito, while the other three are believed to be out of the country.
"I never wanted this trial. I never wanted anyone arrested," Mr Correa said.
Human rights and press freedom groups condemned the severity of the sentences imposed on El Universo.
But Mr Correa said his battle with Ecuador's private media was a fight for justice.
"They have been talking about a dictatorship and they were right," he said.
It was the "dictatorship of the media".
The trial had shown people that they could overcome their fear of a "corrupt" press, Mr Correa said.
In his statement, Mr Correa also said he was dropping a libel case against two other journalists who had written a book detailing the government contracts granted to his brother Fabricio.
Fabricio Correa has repeatedly said they were the result of public tenders.
President Correa, in office since 2007, has long been at odds with the country's media. He accuses them of spreading lies in an attempt to undermine his government.
The libel case against El Universo sparked a torrent of international criticism, including hard-hitting editorials in several US newspapers.