It's the first time the Russian leader has conceded that any election-related hacking attacks may have emanated from his country.
In comments to reporters at the St. Petersburg Economic Forum, Putin likened hackers to "artists," who could act on behalf of Russia if they felt its interests were being threatened.
"(Artists) may act on behalf of their country, they wake up in good mood and paint things. Same with hackers, they woke up today, read something about the state-to-state relations.
"If they are patriotic, they contribute in a way they think is right, to fight against those who say bad things about Russia," Putin said.
Putin: We didn't hack US election
Russia has repeatedly denied involvement in any attempts to influence November's US Presidential election.
When asked directly whether Russia interfered in the election, Putin said in March: "Read my lips: No."
He also described the allegations as "fictional, illusory, provocations and lies."
Derek Chollet, senior adviser of the German Marshall Fund of the US, told CNN's Brian Todd that's not true.
"The US intelligence community in January concluded with high confidence that Vladimir Putin ordered an influence campaign to try to shape the US election. And part of that influence campaign were hackers. This is Putin trying to obfuscate and blur what is the reality."
While he maintained Thursday that the Russian government wasn't behind the attacks, he said hackers anywhere could make their efforts appear like they came from the state.
"The most important this is that we don't do that on government level," he said. "Secondly, I can imagine that some purposefully does that, building the chain of these attacks in a way to make it seem that Russia is the source of these attacks. Modern technology allows to do that quite easily."
However, he said that even if hackers did intervene it's unlikely they could swing a foreign election.
"No hacker can affect an electoral campaign in any country, be it Europe, Asia or America."
"I'm certain that no hackers can influence an electoral campaign in another country. It's just not going to settle on the voter's mind, on the nation's mind," he added.
CNN's Fareed Zakaria said Putin's remarks on the hacking mirror what Putin said when Russia seized Ukraine's Crimea region.
"If you remember, when the invasion of Crimea and the destabilization of eastern Ukraine took place, Vladimir Putin said, 'I don't know who these people are ... it seems there are patriotically minded Ukrainians and Russians who want the Crimea to be part of Russia," Zakaria said.
The US government publicly announced in October that it was "confident" Russia orchestrated the hacking of the Democratic National Committee (DNC) and other political organizations of the Democratic Party in the lead-up to the election.
And in January, days before Trump took office, the US intelligence community concluded that Putin had ordered an "influence campaign" aimed at hurting Trump's rival, Democratic Party candidate Hillary Clinton.
Last month, the US Justice Department appointed a special counsel
led by former FBI Director Robert Mueller to oversee the federal investigation into Russian interference in the election.
US President Donald Trump said the probe "hurts our country"
and has branded the investigation the "single greatest witch hunt" in political history.