Supporters of feminist punk band Pussy Riot say they hope three band members threatened with harsh jail sentences can avoid jail after Madonna used a concert in Moscow to condemn their persecution.

Prosecutors on Tuesday called for the three women – Maria Alyokhina, Nadezhda Tolokonnikova and Yekaterina Samutsevich – to be jailed for three years after arguing they had insulted all of Russian Orthodoxy and posed a danger to society. They have been charged with hooliganism motivated by religious hatred after performing a "punk prayer" against President Vladimir Putin in a Moscow cathedral.

Performing in Moscow's Olimpisky Stadium on Tuesday night, Madonna donned a balaclava and stripped off her clothes to reveal the words "Pussy Riot" scrawled across her back during a performance of her 1984 hit Like a Virgin.

She was the latest in a long list of global stars who have come out to support the trio.

"I know there are many sides to every story, and I mean no disrespect to the church or the government, but I think these girls … have done something courageous and they have paid the price for this act and I pray for their freedom," Madonna said earlier in the show to massive applause. "They deserve the right to be free."

Pytor Verzilov, Tolokonnikova's husband, praised the move: "She might be changing Russia's history by this. To give a sentence after something like this would be commiting international political suicide, admitting that you're no better than North Korea."

In closing arguments on Tuesday, lawyers for Pussy Riot appeared to accept a conviction as a foregone conclusion. "If the order is handed down from above to jail them, then they will be jailed. This is a political case from beginning to end," lawyer Mark Feygin said.

Prosecutors used their closing statements to argue that the women were not carrying out a political act, but acting on deep hatred for Russian Orthodoxy.

"They violated the traditions of our country," Nikiforov said. He said the fact that "no politicians" were named in the punk band's song proved it was not a political act. The name and chorus of the song Pussy Riot performed was Virgin Mary, Chase Putin Out.

Prosecutors presented the women as dangerous feminists. "All the defendants talked about being feminists and said that is allowed in the Russian Orthodox church," said Yelena Pavlova, a lawyer for several of the nine complainants who claimed they were insulted by Pussy Riot's performance.

"This does not correspond with reality. Feminism is a mortal sin."

The Pussy Riot case has reawakened anti-government passions that first emerged when Putin announced last autumn that he was returning to the presidency. Opposition activists have called for an impromptu protest to be held on 19 August.

Addressing the court in the afternoon, defence lawyers for the band argued that the women's performance was an act of opposition against Putin and was not motivated by religious hatred. "The 'prayer' they sang was a political one," lawyer Violetta Volkova said.

Feygin gave an impassioned speech warning of the consequences of a conviction, which ended with applause from the journalists witnessing the trial.

"Russia has no rule of law. Russia has no justice system," he said. "Nothing has changed from Soviet times."

He warned that a guilty verdict would "definitely tear up relations between society and government".

Society would never forgive the government for jailing three innocent women, he said, warning that tensions, including between society and the church, were building to similar levels as before the Bolshevik revolution of 1917.

But Feygin appeared to accept a conviction as a foregone conclusion. "If the order is handed down from above to jail them, then they will be jailed. This is a political case from beginning to end."

Pussy Riot have argued that their performance inside Moscow's Cathedral of Christ the Saviour in February was designed to call attention to the politicisation of the Orthodox church, which was a key agitator for Putin's re-election.

Church officials have said their trial has been willed by God. The women have apologised if they offended any Orthodox believers.

Prosecutors said on Tuesday that their apologies were insincere and that the victims had "the right not to be merciful". They argued that the leader of the church, Patriarch Kirill, had been personally insulted and was "not just an ordinary citizen".

The three women addressed the court on Tuesday and urged the judge to deliver a not-guilty verdict.