Nejib Naimi, a former Qatari justice minister who represents Ajami, said the court reached its decision Thursday after six hearings, most of them held in secret, Middle East Online reported. Naimi said he plans to appeal since Ajami was convicted of crimes that should have brought no more than a five-year sentence.
The international human rights group Amnesty International criticized the sentence.
"It is deplorable that Qatar, which likes to paint itself internationally as a country that promotes freedom of expression, is indulging in what appears to be such a flagrant abuse of that right," said Philip Luther, Amnesty's regional director.
Amnesty said Ajami's arrest last year appears to have been caused by his "jasmine poem," which is critical of regimes in the region.
"We are all Tunisia in the face of the repressive elite," Ajami wrote.
Notable deaths of 2014 [PHOTOS]
Meet the hero in attack on Canadian Parliament