Then-President Barack Obama authorized "planting cyberweapons" in Russian infrastructure before he left office in response to Moscow's interference in the 2016 election, according to a Washington Post report Friday.

President Donald Trump would have to decide whether to use the measure, which was in its planning stages when Obama left the White House in January, the newspaper reported.

That previously undisclosed detail was part of a report that gives perhaps the most detailed account yet of the Obama administration's response to Russian meddling in the election, which top lawmakers have called an attack on American democracy. It has prompted FBI and congressional investigations, which Trump has repeatedly called a "witch hunt" designed to discredit his presidency. Trump is reportedly under investigation over whether he tried to impede the FBI's investigation.

After the CIA said it discovered last year that Russian President Vladimir Putin ordered a campaign to harm Hillary Clinton and help then-candidate Trump, the Obama administration and congressional leaders were reluctant to take action before November's election.

After finding out about the intelligence in August, Obama decided he did not want to "make things worse," the Post reported. His administration thought that taking action "could provoke an escalation from Putin" or "be perceived as political interference in an already volatile campaign." Trump made claims at the time that the election was "rigged."

In a statement, Obama senior advisor Eric Schultz said he took Russian meddling "very seriously."

"This situation was taken extremely seriously, as is evident by President Obama raising this issue directly with President Putin; 17 intelligence agencies issuing an extraordinary public statement; our homeland security officials working relentlessly to bolster the cyber defenses of voting infrastructure around the country; the President directing a comprehensive intelligence review, and ultimately issuing a robust response including shutting down two Russian compounds, sanctioning nine Russian entities and individuals, and ejecting 35 Russian diplomats from the country," Schultz said in a statement.

In August, the Department of Homeland Security appealed to state election leaders to help them better protect their systems. Some officials at the time called it a politically motivated move to interfere in their processes, former DHS Secretary Jeh Johnson told a House hearing this week. At least one official — Georgia's Republican secretary of state, Brian Kemp — "remains unconvinced" that Russia tried to disrupt the election, according to the Post.

At an Obama administration meeting with congressional leaders in September, Senate Majority Leader Mitch McConnell, R-Ky., was skeptical about the intelligence underlying the claims that Russia interfered, according to the newspaper's report. His office declined to comment to CNBC and the Post.

The Obama administration would eventually reveal the Russian efforts publicly in an unclassified report in January — weeks after the election — but it has faced criticism for not doing so earlier. Johnson noted in his testimony this week that a public statement about Russian interference in October got overshadowed because it came around the same time as the release of a 2005 tape in which Trump bragged about groping women.

Obama eventually approved sanctions against Russia, but they were "so narrowly targeted that even those who helped design them describe their impact as largely symbolic," according to the Post.

Read the full Washington Post report here.