The US on Thursday sanctioned Russia for hacking the servers of the democratic party:
- Thirty-five diplomats from Russia's Washington embassy and its consulate in San Francisco were declared "persona non grata" and given 72 hours to leave the US with their families
- Two properties said to have been used by Russian intelligence services in New York and Maryland will be closed
- Sanctions were announced against nine entities and individuals including two Russian intelligence agencies, the GRU and the FSB
Mr Obama, who will be replaced by Donald Trump on 20 January, had vowed action against Russia amid US accusations that it directed cyber-attacks on the Democratic Party and Hillary Clinton's campaign.
Emails stolen from her campaign manager and from the servers of the Democratic National Committee - some containing embarrassing information for Democrats - were released during the election campaign.
Vladmir Putin Rules out Tit-for-Tat:RussianPresident Vladimir Putin ruled out a tit-for-tat response after the US
expelled 35 Russian diplomats amid a row over hacking.
He said Russia would not "stoop" to the level of "irresponsible diplomacy" but would work to restore ties with the US under President-elect Donald Trump.
Russia's foreign ministry had formally asked Mr Putin to expel 35 US envoys.
The country denies involvement in hacking related to the US election, calling US sanctions "ungrounded".
Prime Minister Dmitry Medvedev accused the outgoing US administration of President Barack Obama of ending in "anti-Russian death throes".
A skilled hand
This was a carefully stage-managed response from Mr Putin - dangling the possibility of tit-for-tat expulsions and then showing magnanimity in postponing any response - at least for now.
It is fundamentally a put-down for the Obama administration, suggesting that, in Moscow's view, it is such a lame-duck, so irrelevant, as to make any response unnecessary.
It also poses an immediate test for President-elect Trump. Will he be convinced by the evidence the US intelligence agencies say they have? And, if so, what course will he steer in his relations with Russia?
This is no new Cold War. Russia is simply a kind of "pocket" superpower, nothing like the Soviet Union of old. But Mr Putin has shown here in relations with the West, as in Ukraine and Syria, that he can play a limited hand with great skill. Mr Trump will need to respond to this challenge in a decisive but graduated way.
'Putin invites all american families'
In a statement on the Kremlin website (in Russian), Mr Putin said: "We won't be expelling anyone.
"We won't be banning their families and children from the places where they usually spend the New Year holidays. Furthermore, I invite all children of American diplomats accredited in Russia to the New Year and Christmas Tree in the Kremlin."
He wished Barack Obama and his family a happy New Year, as well as Mr Trump and "the whole American people".
In a message on the presidential website, Mr Putin said that, with the accession of Mr Trump, "the two states, acting in a constructive and pragmatic manner, can take real steps for restoration of mechanisms for bilateral co-operation".
President-elect Trump has dismissed the hacking claims as "ridiculous" and said Americans should "get on with our lives" when asked previously about the possibility of sanctions.
However, he said late on Thursday he would meet US intelligence chiefs next week to be "updated on the facts of this situation".
Russia's foreign ministry had reportedly suggested expelling 31 US diplomats from Moscow and four from St Petersburg.
It also suggested banning US diplomats from their dachas (holiday homes) in Serebryany Bor near Moscow and a warehouse on Moscow's Dorozhnaya Street.
Russia is sending a special plane to the US to fly home its diplomats.
The move followed reports that they were struggling to buy plane tickets because flights were full ahead of the New Year holiday.
Russian foreign ministry spokeswoman Maria Zakharova has denied a report by CNN that Moscow is shutting down a school attended by diplomats' children.
She said it was a "lie" that the Anglo-American School faced closure as retaliation.
Meanwhile, the Russian embassy to the UK tweeted a visual gag calling the Obama presidency a lame duck.