Artyom Kamardin, 33, received a seven-year sentence for reciting a poem, and Yegor Shtovba, 23, was sentenced to five and a half years for attending the protest.
The two were seen behind a glass partition in a heavily-guarded courtroom.
Just before his sentencing, a smiling Kamardin recited a poem that refers to poetry as “gut-wrenching” and often disliked by “people accustomed to order”.
After the sentence was read out, there were cries of “Shame!” from supporters in the courtroom, some of whom were later detained by police outside the court building, an AFP reporter saw.
Russian authorities have detained thousands for simple acts of protest against the offensive in Ukraine, with criticism effectively outlawed.
Kamardin has claimed that during his detention he was raped by police officers and forced to film an apology video as officers threatened his partner.
On the eve of his arrest in September 2022, he had recited his poem “Kill me, militia man!” on a Moscow square where dissidents have been gathering since the Soviet era.
Kamardin also shouted offensive slogans against the imperial “New Russia” project aiming to annex the south of Ukraine.
Both were convicted of “inciting hatred” and “calling for activities threatening state security”.
Kamardin told the court he did not know his actions broke the law and asked for mercy.
“I am not a hero, and going to prison for my beliefs was never in my plans,” he said in a statement, posted on his supporters’ Telegram channel.
– ‘Under torture’ –
After the sentencing, his father Yury said: “This is a total outrage!”
Around two dozen friends came to support the defendants along with the poets’ parents and wives.
Kamardin’s wife Alexandra Popova was in the crowd.
“It is a very harsh sentence. Seven years for poems, for a non-violent crime,” she told AFP, before being taken away by police officers.
In an interview with AFP in late 2022, she had recounted her then boyfriend’s arrest, saying officers threatened her with “gang rape”, hit her and sprayed superglue on her cheeks and mouth.
Meanwhile Kamardin was taken to a separate room, where — as he told his lawyer — he was beaten and raped with a barbell.
Kamardin was also forced to film an apology video.
– Sorry for ‘leaving you’ –
Shtovba also insisted he did not break the law.
In his last statement in court, published by independent site Mediazona, he asked the judge: “What have I done that’s illegal? Read poetry?”
He also addressed his mother, who he said depended on him financially.
“Mom, I know that you, more than anyone, believe in my innocence… Still, I’m sorry for how things turned out, leaving you and dad alone.”
Nikolai Dayneko, who was arrested at the same time, was sentenced to four years in prison last May after entering a pre-trial agreement, according to OVD-info.
These are the latest in a string of heavy sentences against Russians who protested the offensive, in trials critics denounce as absurd.
Germany’s foreign ministry condemned Thursday’s verdict, accusing the Kremlin of “letting the judiciary stifle freedom of expression”.
In mid-November judge Oksana Demiasheva sentenced artist Alexandra Skochilenko to seven years in prison for swapping price tags with slogans criticising Russia’s offensive in Ukraine.
Skochilenko had replaced five price tags in a branch of one of Russia’s largest supermarket chains in Saint Petersburg with messages about the conflict.
The trials of ordinary Russians usually take place away from public attention, unlike those of prominent critics.
Most of Russia’s high-profile opposition figures have fled the country or are behind bars, including Alexei Navalny.