WASHINGTON - The United States on Thursday fired back at Moscow over its meddling in the presidential election, announcing a series of tough sanctions against intelligence agencies, expulsions of agents and shutting down of Russian compounds on US soil.

"I have ordered a number of actions in response to the Russian government's aggressive harassment of US officials and cyber operations aimed at the US election," Obama said.

"These actions follow repeated private and public warnings that we have issued to the Russian government, and are a necessary and appropriate response to efforts to harm US interests in violation of established international norms of behavior."

Among the measures announced were sanctions against Russia's FSB and GRU intelligence agencies; the designation of 35 Russian operatives as "persona non grata"; and the closure of two Russian compounds in New York and Maryland that the United States says are used "for intelligence-related purposes."

"These actions follow repeated private and public warnings that we have issued to the Russian government, and are a necessary and appropriate response to efforts to harm US interests in violation of established international norms of behaviour," President Obama said in a statement.

Obama signed an executive order outlining economic penalties for individuals and organisations involved in "tampering with, altering, or causing a misappropriation of information with the purpose or effect of interfering with or undermining election processes or institutions."

The sanctions affect "nine entities and individuals," Obama said: "The GRU and the FSB, two Russian intelligence services; four individual officers of the GRU; and three companies that provided material support to the GRU’s cyber operations."

US intelligence agencies have accused the Russians of getting involved in the election in order to help Donald Trump win the presidency, accusations that President Vladimir Putin and other Russian officials have denied. These agencies are conducting a formal investigation, and Congress is likely to conduct a probe of its own.

Obama had pledged a response earlier this month, and also suggested that covert activity —including US cyber activity — may be involved as well.

"These actions are not the sum total of our response to Russia’s aggressive activities," Obama said Thursday. "We will continue to take a variety of actions at a time and place of our choosing, some of which will not be publicized."

Trump, who has questioned whether the Russians were involved in the hacking, expressed skepticism about sanctions in speaking with reporters Wednesday night.

"I think we ought to get on with our lives," Trump said, adding: "I think that computers have complicated lives very greatly — the whole age of computer has made it where nobody knows exactly what is going on."

Trump and his aides have also said that Democrats are pushing the Russia hack story as part of an effort to explain away the loss by Democratic candidate Hillary Clinton.

Anticipating the sanctions Wednesday, Russia accused Obama of acting out of spite, and pledged retaliation. “People in the White House need to understand clearly that if Washington really takes new hostile steps, then it will receive a response,” foreign ministry spokeswoman Maria Zakharova said in a video statement.

Trump harped on the email releases during his campaign against Clinton, claiming the reflected favours the secretary of state and her team did for contributors to the Clinton Foundation. Clinton backers cited Trump statements that seemed to encourage the Russians to hack Clinton herself.

Leaked emails also reflected tensions within the Democratic Party. The leaks to the resignation of Democratic National Committee chairwoman Debbie Wasserman Schultz, amid claims that the party favoured Clinton over primary rival Bernie Sanders.

Thursday's sanctions are essentially additions of ones the Obama administration placed on Russia after it annexed the Crimea region of Ukraine.

Obama did not cite Putin in his statement, or sanction him directly, but did say that "these data theft and disclosure activities could only have been directed by the highest levels of the Russian government."

The current president also did not cite Trump by name. but said that "all Americans should be alarmed by Russia’s actions," and added that the Russians "took actions intended to interfere with the U.S. election process." Such activities have consequences, he said.

Obama said his administration will soon "be providing a report to Congress in the coming days about Russia’s efforts to interfere in our election, as well as malicious cyber activity related to our election cycle in previous elections."