Drareni, 40, has been in custody since March and was sentenced in August to three years in jail for his coverage of Algeria's year-long anti-government demonstrations.
Although Drareni's sentence was reduced by a year from an August judgement, lawyers, colleagues and relatives of Drareni who had been hoping for a lenient judgement -- if not acquittal -- said they were shocked by the harsh verdict.
The journalist's brother, Chekib Drareni, said in a tweet that he was "disgusted, shocked and disappointed by the court's decision, which once again reinforces injustice in Algeria".
Lawyer Mustapha Bouchachi told AFP that Drareni's defence team "are going to appeal to the supreme court".
Drareni, editor of the Casbah Tribune news site and correspondent for French-language TV5 Monde, was found guilty of "inciting an unarmed gathering" and "endangering national unity".
He was also accused of having criticised on Facebook the "corruption and money" of the political system, according to Reporters Without Borders (RSF), the press freedom watchdog for which Drareni also works.
The Minister of Communication Ammar Belhimer also criticised the journalist for working without ever having a professional press card, against a background of allegations of being in the service of "foreign embassies".
The severity of the sentence triggered the indignation and anger of journalists who came to support him in court.
"We are outraged by the blind stubbornness of the Algerian judges who have just condemned (Drareni) to two years in prison," Christophe Deloire, RSF secretary general, tweeted after the verdict was announced.
"Khaled's detention proves the regime locks itself into a logic of absurd, unfair and violent repression."
Drareni was tried along with Samir Benlarbi and Slimane Hamitouche, two figures of the protest movement known as "Hirak".
Benlarbi and Hamitouche faced the same charges but were sentenced to four months in prison and released on time served.
The prosecutor had originally called for a four-year prison sentence for all three defendants.
Drareni has denied all charges against him.
"I am a journalist, not a criminal. I only did my job," he said.
'Won't give up'
Drareni, who appeared to have lost significant weight during the trial, has the support of a global solidarity campaign.
His supporters have demanded his "immediate and unconditional" release because of his "worrisome" health condition, according to RSF.
Drareni's trial comes in a context of increased repression against Hirak activists, political opponents, journalists and bloggers.
The Hirak movement broke out in February last year and led to the resignation of longtime president Abdelaziz Bouteflika, whose plans to run for a fifth term had sparked the protests.
Weekly demonstrations continued after Bouteflika's ouster to demand wholesale political change, but halted in March due to restrictions to end the novel coronavirus crisis.
Some journalists have been accused by the regime of sowing discord, threatening the national interest and being in the pay of "foreign parties", with several imprisoned and other trials ongoing.
Algeria ranked 146 out of 180 countries in the RSF's 2020 World Press Freedom Index.
According to prisoners' rights group CNLD, some 45 people are currently behind bars on charges related to the Hirak protests.
For Hakim Addad, a Hirak activist, "it is important to continue the movement, including media pressure but also political pressure, so that (the authorities) understand that we won't give up".