Five journalists and a teacher have been found guilty of insulting Mali's president over a school essay.
President Toure was hailed after ending military dictatorship
All were given suspended jail terms at a closed door trial in the capital.
Teacher Bassirou Kassim Minta asked his final-year secondary school class to write a humorous essay about the mistress of a fictional African leader.
He was arrested, along with a journalist who wrote about the task. The arrests have been condemned by press freedom organisations.
The BBC's Salif Sanogo in Bamako says that about 300 people turned up for the trial before being told they were barred.
He says that security was tight around the court.
Defence lawyers boycotted the proceedings.
"We want to show by our absence that the freedom of the press is being violated in Mali," defence lawyer Mamadou Gakou told the AFP news agency.
Journalist Seydina Oumar Diarra wrote an article, called The Mistress of the President of the Republic, in the Info-Matin newspaper about the essay.
Police then arrested him and Mr Minta.
They were given suspended sentences of eight months each.
Following the detentions, the article was reprinted in other newspapers, leading to the arrest of four more journalists and editors.
They were given suspended three month sentences as accomplices.
After the trial, all six were taken back to prison to carry out the formalities before being freed.
Reporters Without Borders last week urged President Amadou Toumani Toure to release those detained.
"The result of a prosecutor's absurd zeal, these two arrests are worthy of another age and are clearly an abuse of authority," the press freedom group said.
"Mali was hailed as an example of democracy in Africa, but as this case goes from bad to worse, it is looking more and more like an authoritarian regime, crippled by taboos and dangerous for those who show a lack of respect for an untouchable president."
Earlier this month, the World Association of Newspapers (WAN) urged African countries to scrap their laws on insulting leaders at a congress in South Africa.
Its declaration said such laws, which are in force in 48 out of 53 African countries, were "the greatest scourge" of press freedom on the continent.
President Toure was last month re-elected for a second five-year term in first-round presidential elections.
International monitors said the vote appeared to have gone smoothly, but opposition candidates alleged fraud.
Mr Toure, known as "ATT", was hailed after ending Mali's military dictatorship with a coup 16 years ago and then stepping down after organising elections.