The US has expelled 35 Russian diplomats as punishment for alleged interference into the presidential election.

It will also close two Russian compounds used for intelligence-gathering, in Maryland and New York, as part of a raft of retaliatory measures.

President Barack Obama had vowed action against Russia amid US accusations it directed hacks against the Democratic party and Hillary Clinton’s campaign.

Russia has denied any involvement.

The US State Department declared the 35 Russian diplomats from the Washington DC embassy and the consulate in San Francisco “persona non grata”, giving them and their families 72 hours to leave the US.

The Russian government is expected to respond in turn by expelling US diplomats.

Sanctions have also been announced against nine entities and individuals including the GRU and FSB Russian intelligence agencies.

The US Department of Treasury said that the move targets those responsible for “undermining election processes or institutions”.

In a statement President Barack Obama said “all Americans should be alarmed by Russia’s actions.

He called them a “necessary and appropriate response to efforts to harm US interests”, adding it would not be “the sum total of our response to Russia’s aggressive activities”.