US President Barack Obama has vowed to take action against Russia for its alleged interference in the US presidential election campaign.

“We need to take action and we will,” he told US radio station NPR.

Russia stands accused by the US of hacking the emails of the Democratic Party and a key Hillary Clinton aide, which the Kremlin strongly denies.

Republican president-elect Donald Trump has also dismissed the claim as “ridiculous” and politically motivated.

The intelligence agencies say they have overwhelming evidence that Russian hackers linked to the Kremlin were behind the hacks.

And on Thursday, a White House spokesman said President Vladimir Putin was involved in the cyber-attacks.

Hours later, Mr Obama said: “I think there’s no doubt that when any foreign government tries to impact on the integrity of our elections, that we need to take action and we will, at a time and a place of our own choosing.

“Some of it may be explicit and publicised. Some of it may not be.

“Mr Putin is well aware of my feelings about this, because I spoke to him directly about it.”

It is not clear what action the US intends to take, with Mr Obama leaving office on 20 January.

The disclosure of emails was embarrassing to the Democratic Party at a crucial point in the election campaign.

The CIA has concluded that Russia’s motivation was to sway the election in favour of Mr Trump, but no evidence has been made public.

Mr Trump has accused the Democrats of fabricating Russian involvement to hide their embarrassment at the election defeat.

He has also long expressed admiration for Mr Putin, and his pick for secretary of state – oil tycoon Rex Tillerson, who has worked closely with the Russian leader – has raised concerns.

Mr Trump tweeted on Thursday: “If Russia, or some other entity, was hacking, why did the White House wait so long to act? Why did they only complain after Hillary lost?”

However, the Obama administration in October directly accused Russia of hacking US political sites and email accounts with the aim of interfering with the upcoming election.

A headache for Trump – Anthony Zurcher, BBC News, Washington
Democrats have struggled to grasp why Hillary Clinton lost. Could it be the spread of “fake news”? A poor Democratic ground game in Midwestern states? 

FBI Director James Comey’s last-minute letter to Congress about new Clinton emails?

Anything but acknowledge that Donald Trump turned out to be the more effective candidate with a more appealing message (at least in the states that mattered).

Russian government hackers are the latest culprit – or scapegoat, depending on one’s perspective. They’re a tempting target, however, given the latest accounts of intrigue from intelligence community sources. A wily Vladimir Putin overseeing damaging leaks makes for a deliciously villainous plot.

Of course those campaign emails, while certainly an annoyance to Democrats, likely weren’t enough to tilt the election. But that doesn’t mean these revelations won’t be a headache for a president-elect who bristles when challenged.

Now he’s feuding with his own intelligence services and lashing out on Twitter, virtually guaranteeing more leaks. A congressional investigation seems likely. There’s even talk of a Russian sanctions bill ending up on President Trump’s desk.

Mrs Clinton’s loss still stings, but for forlorn Democrats seeing Mr Trump squirm would be a salve for open wounds.