MOSCOW — It has been a good week for Russian President Vladimir Putin — at the end of a pretty good year.

Russia's parliament approved an amnesty law Wednesday that is likely to result in freedom for two jailed members of the punk music group Pussy Riot, and for 30 people facing charges over a Greenpeace protest against Arctic oil drilling.

The move appears to take off the table two high-profile cases that could sour the atmosphere for the Olympic Winter Games, which Putin will host in February. Russian officials have been working for months to overcome anger related to a third issue, its legislation prohibiting gay "propaganda," which spurred calls for a boycott of the Games.

The parliament's action follows by a day Putin's decision to lend neighboring Ukraine $15 billion and cut the price it charges Kiev for natural gas by more than 30%, key steps to prevent Ukraine from seeking closer association with the European Union. That would help Putin retain influence in a broad swath of territory encompassing major pieces of the former Soviet Union.

Also this year, Putin deftly handled the asylum bid by former National Security Agency contractor Edward Snowden and found a way to head off U.S. military strikes on Kremlin ally Syria as punishment for using chemical weapons against its own people.

In approving the amnesty, human rights activists said, Russia did little more than remove some irritants, while not easing the pressure on foes who could cause Putin serious problems. Former tycoon Mikhail Khodorkovsky, whose prison term expires next year, is staying in jail, and analysts say officials are preparing a new case against him.

Nor will the amnesty apply to most of those under investigation for organizing protests on the eve of Putin's inauguration last spring.

In the Pussy Riot case, two members were sentenced to two years in prison for staging an anti-Putin "punk prayer" last year at a Moscow cathedral. Without amnesty, their terms would expire in March.

"Putin himself must know that even by his standards, they have already been punished way beyond any reason, and they are coming out in three months anyway, amnesty or no amnesty," said Lilia Shevtsova, a senior researcher at the Moscow Carnegie Center.

"He can't let out protesters who clashed with the police on the eve of his inauguration and spoiled his holiday, but he can let go of Greenpeace activists who already spent two months in jail for nothing," she said.

Shevtsova called the amnesty "an imitation thaw for Western consumption."

Human rights activists lashed out at the Kremlin for reducing the scope of an amnesty that would have freed 30,000 people. The bill unanimously approved by the State Duma, the lower house of the parliament, will free 2,000 to 5,000 people. It is expected to take effect this week.

The amnesty applies to people jailed or detained for offenses punishable by no more than five years in prison. Among those who can be freed are mothers with young children and people who committed offenses as minors, have disabilities or who served in hot spots with the Russian military.

Pussy Riot members Nadezhda Tolokonnikova and Maria Alyokhina were accused of hooliganism, an offense covered by the amnesty. Both also have young children. A third member of the group, Yekaterina Samutsevich, was given a suspended sentence.

Alyokhina hinted this week that she might not want amnesty.

"Can I refuse to be amnestied?" she was quoted as saying in a tweet sent from the account of the Russian art collective Voina. "I have so much to do in the [labor] colony."

Denis Sinyakov, a well-known Russian freelance photographer who was covering the Greenpeace protest and was on the group's icebreaker ship when it was stormed by Russian commandos in September, also was not thrilled about the idea of receiving amnesty.

"I and my Greenpeace friends did nothing wrong and committed no crime," Sinyakov said. "I think this is how the authorities are trying to get out of the uncomfortable situation they drove themselves into with their lawless action against us all."

The group spent more than two months in custody in the northern Russian port of Murmansk and in St. Petersburg before they were released on bail last month, pending an investigation.

Sergei Markov, a political analyst close to the Kremlin, hailed the amnesty as an act of clemency, designed not for Pussy Riot and Greenpeace but for thousands of ordinary people who had committed minor crimes.