The move followed Britain's decision on Wednesday to expel 23 Russian diplomats over the attack in the English city of Salisbury which left former Russian spy Sergei Skripal, 66, and his daughter Yulia Skripal, 33, critically ill in hospital.
Moscow announced the measures on the eve of a presidential election which incumbent Vladimir Putin should comfortably win. Putin has cast his country as a fortress besieged by hostile Western powers with him as its defender, and state media is likely to portray the anti-British move in that context.
The Foreign Ministry said Moscow's measures were a response to what it called Britain's "provocative actions and unsubstantiated accusations". It warned London it stood ready to take further measures in the event of more "unfriendly steps".
Relations between London and Moscow have crashed to a post-Cold War low over the Salisbury attack, the first known offensive use of a nerve agent in Europe since World War Two.
British Prime Minister Theresa May said Britain would consider its next steps with its allies in the coming days.
"We will never tolerate a threat to the life of British citizens and others on British soil from the Russian Government. We can be reassured by the strong support we have received from our friends and allies around the world," May told her Conservative Party's spring forum in London.
The Russian Foreign Ministry summoned the British ambassador, Laurie Bristow, to its headquarters on Saturday morning to inform him of the retaliatory measures.
Bristow told reporters afterwards that Britain had only expelled the Russian diplomats after Moscow had failed to explain how the nerve toxin had got to Salisbury.
Britain's foreign ministry said it had anticipated Russia's response and that its priority was to look after its staff in Russia and assist those returning home.
"Russia’s response doesn’t change the facts of the matter - the attempted assassination of two people on British soil, for which there is no alternative conclusion other than that the Russian State was culpable," it said in a statement.
Britain's National Security Council is due to meet early next week to consider London's next steps.
WAR OF WORDS
Russia's response was more robust than expected. The closure of the British Council's Moscow office will sever cultural ties, while that of the consulate-general in St Petersburg will end Britain's diplomatic presence in Russia's second city.
Russian news agencies cited politicians in Russia's upper house of parliament as welcoming the move to close the British Council, alleging it had been used as a cover by British spies.
The British Council said it was profoundly disappointed by Russia's decision and remained committed to developing long-term people-to-people links with Russia despite the closure.
Russia has complained that Britain has failed to provide any evidence of its involvement in the Salisbury attack and has said it is shocked and bemused by the allegations.
Britain has escalated a war of words with Russia over the incident in recent days. On Friday, British Foreign Secretary Boris Johnson said it was overwhelmingly likely that Russian President Putin himself had made the decision to use a military-grade nerve toxin to strike down Skripal.
Britain, the United States, Germany and France have jointly called on Russia to explain the attack and U.S. President Donald Trump has said it looks as if the Russians were behind it.
Russia has said is open to cooperation with Britain, but has refused Britain's demands to explain how Novichok, a nerve agent developed by the Soviet military, was used against the Skripals.
Skripal, a former colonel in the GRU who betrayed dozens of Russian agents to British intelligence, and his daughter have been critically ill since March 4, when they were found unconscious on a bench.
A British policeman was also poisoned when he went to help them and remains in a serious but stable condition.
Russian Foreign Ministry spokeswoman Maria Zakharova told the Rossiya 24 TV channel on Saturday that the most likely source of the Novichok nerve toxin was Britain itself or the Czech Republic, Slovakia, Sweden or the United States.
Those countries, not Russia, had been intensively testing the substance since the end of the 1990s, Zakharova said. The assertion could not be immediately verified.
The Swedish and Czech foreign ministers and the Slovak foreign ministry all separately rejected the Russian claim.
Russian investigators said on Friday they had opened a criminal investigation into the attempted murder of Yulia Skripal and offered to cooperate with British authorities.
Russia offered some cooperation to British authorities after the 2006 London murder of ex-KGB agent Alexander Litvinenko too.
Britain said the assistance in that case was not enough, and in 2016, an inquiry concluded that Putin had probably approved Litvinenko's murder, something Moscow denies.
(Additional reporting by Maria Vasilyeva and Mikhail Antonov in Moscow and Sarah Young in London Editing by Angus MacSwan and Hugh Lawson) ((firstname.lastname@example.org; +7 495 7751242; Reuters Messaging: email@example.com))