The United States says it is expelling nearly three dozen Russian diplomats as it announced new economic sanctions and other punitive measures in response to alleged Russian hacking during the presidential election.

The moves, announced on December 29 by the White House, had been widely publicized ahead of time, including by President Barack Obama in an interview earlier this month.

But the moves also come less than a month before Obama leaves office and his successor, Donald Trump, assumes the presidency. Trump has repeatedly brushed aside intelligence assessments and White House statements about the alleged Russian hacking, raising the question about whether the new sanctions will remain in place after his inauguration on January 20.

A White House statement said two Russian diplomatic compounds in Maryland and New York, believed to be involved in intelligence gathering, were ordered closed, and 35 Russians, identified as intelligence operatives, were being expelled from the country.

Additionally, nine top officials and entities associated with the Russian military intelligence agency, the GRU, and the main Russian security agency, the FSB, were being hit with new financial and travel sanctions.

A senior U.S. administration official, who spoke on condition of anonymity, said the four GRU officials were directly involved in computer hacking, including that of U.S. political parties. Three companies hit with sanctions provided "material support" to GRU hacking efforts, the official said.

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

The Kremlin has repeatedly denied it was behind any computer intrusions of U.S. political parties or e-mail systems, though President Vladimir Putin has also made cryptic comments suggesting possible involvement of Russian officials.

Responding to the White House announcement on December 29, Kremlin spokesman Dmitry Peskov told news agencies that Moscow regretted the new measures, calling them unlawful and saying they would "destroy diplomatic relations with Russia."

Russia Accused Of Backing Trump Over Clinton

The CIA, the FBI, and the broader U.S. intelligence community have concluded that hackers, likely operating with the authority of the highest levels of the Russian government, broke into Internet servers and e-mail accounts belonging to the U.S. Democratic Party, and other officials during the election campaign.

On December 9, The Washington Post reported that the CIA had determined the intent of the Russia hackers was to help Trump win the presidency, not just to undermine confidence in the U.S. electoral system.

The New York Times also reported that intelligence officials had concluded Russian hackers accessed Republican Party computers but didn't release potentially damaging e-mails or other materials.

That led analysts to conclude that the intent of the Russian hacking was to in fact help propel Trump to the White House. He ultimately prevailed in the November 8 election, defeating Democrat Hillary Clinton.

Those conclusions have been repeatedly dismissed by Trump, most recently on December 28, in remarks at his estate in Palm Beach, Florida.

"I think we ought to get on with our lives. 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. We have speed, we have a lot of other things, but I'm not sure we have the kind of security we need," Trump told reporters.

In a December 11 television interview, he asserted that the CIA conclusions were being used by Democrats to undermine his electoral victory.

But Trump has also faced growing pressure in Congress, including by top Republican lawmakers, who have called for a full inquiry into the extent of Russian hacking.

At least three separate Senate committees are slated to launch investigations in January.

Administration officials indicated the targeting of the 35 Russian diplomats, whom the White House identified as intelligence officers, was partly in response as well to what they said was sustained harassment against U.S. diplomats in Russia.

Those U.S. complaints have been mounting for months now, what one administration official called "behavior unprecedented in the post-Cold War era."

In conjunction with the new measures, the Department of Homeland Security released a new report detailing some of the Russian hacking, which included not only state electoral databases but other "critical infrastructure."

"To be very clear here, they have been interfering in the American democratic process and the conduct of American diplomacy, this should be of concern to all Americans and members of both parties," one administration official said.

In addition to punishing Russian activities, U.S. officials said the new measures were aimed at deterring future activity, in the United States and in what they said were U.S. allies.

"Russia is not going to stop. We have every indication that they will continue to interfere in democratic elections in other countries," the official said.