Updated

Russian President Vladimir Putin announced Thursday that two members of the jailed Pussy Riot punk band -- which has criticized Putin in the past -- will be released as part of an amnesty deal.

Nadezhda Tolokonnikova, 24, and Maria Alyokhina, 25, are serving a two-year sentence following a protest last February in which they performed a “punk prayer” against Putin at a Russian Orthodox church in Moscow, according to Reuters.

Putin said the deal was passed by the Kremlin-controlled parliament to mark the 20th anniversary of Russia’s post-Soviet constitution.

"I was not sorry that they ended up behind bars," Putin said during a press conference Thursday. "I was sorry that they were engaged in such disgraceful behavior, which in my view was degrading to the dignity of women."

The women were due to leave jail in March but will be freed sooner, partly because they are both mothers of small children, Reuters reported.

The amnesty deal will also apply to the Greenpeace crew facing hooliganism charges for their protest at a Russian oil rig in the Arctic.

Putin alleged that the Greenpeace activists were trying to hurt Russia's economic interests. He added that he did not mind that charges against the Greenpeace team were dropped under Wednesday's amnesty bill, but that he hoped that "this will not happen again."

Meanwhile, Putin announced that he will pardon jailed oil tycoon Mikhail Khodorkovsky, a surprise decision that will let his top foe and Russia's formerly richest man out of prison after more than a decade.

Putin said that Khodorkovsky, who is set to be released in August 2014, had submitted an appeal for pardon, something he had refused to do before.

"He has spent more than 10 years behind bars. It's a tough punishment," Putin said. "He's citing humanitarian aspects -- his mother is ill. A decree to pardon him will be signed in the nearest time."

The head of the Kremlin's United Russia faction said he expects Khodorkovsky to celebrate the New Year at home with his family.

Khodorkovsky's son, Pavel, tweeted:  "Very happy news. Waiting to speak with my father to learn more."

Putin's announcement "came as a big surprise for me, totally out of the blue," Khodorkovsky's mother told RT television.

In October 2003, masked commandos stormed into Khodorkovsky’s jet on the tarmac of a Siberian airport and arrested him at gunpoint. He was found guilty of tax evasion in 2005 and convicted of embezzlement in a second case in 2010.

Critics have dismissed the charges against Khodorkovsky as a Kremlin vendetta for challenging Putin's power.

Putin weathered months of massive protests against his rule in 2011-2012, when more than 100,000 gathered to oppose his return to the Russian presidency. A demonstration in May 2012 a day before his inauguration for a third term ended in scuffles with police.

The amnesty bill included only 8 out of 26 people tried or awaiting trial in connection with that protest. Two of them were freed in a courtroom as Putin's news conference was still ongoing.

Putin defended the decision not to offer amnesty to others, saying that their release would give a bad example. "No one should be allowed to violently trample on the law," Putin said.

The Associated Press contributed to this report.