WASHINGTON (AP) — Law enforcement officials became so concerned by President Donald Trump’s behavior in the days after he fired FBI Director James Comey that they began investigating whether he had been working for Russia against U.S. interests, the New York Times reported Friday.

The report cites unnamed former law enforcement officials and others familiar with the investigation.

The inquiry forced counterintelligence investigators to evaluate whether Trump was a potential threat to national security, and they also sought to determine whether Trump was deliberately working for Russia or had unintentionally been influenced by Moscow.

The Times reports that FBI agents and some top officials became suspicious of Trump's ties to Russia during the 2016 presidential campaign but didn't launch an investigation at that time because they weren't sure how to approach such a sensitive and important probe, according to the sources. But Trump's behavior in the days around Comey's May 2017 firing, specifically two instances in which he seemed to tie Comey's ousting to the Russia investigation, helped trigger the counterintelligence part of the investigation, according to the Times' sources.

Robert Mueller took over the investigation when he was appointed special counsel soon after Comey's firing. The overall investigation is looking into Russian election interference and whether Trump's campaign coordinated with the Russians. The Times says it's unclear whether Mueller is still pursuing the counterintelligence angle.

Trump’s lawyer Rudy Giuliani told the Times that he had no knowledge of the inquiry but said that since it was opened a year and a half ago and Trump’s team hadn’t heard anything, apparently “they found nothing.” Trump has also repeatedly and vociferously denied collusion with the Russians.

The White House press secretary, Sarah Huckabee Sanders, called the Times' report "absurd" and said Comey was fired for being "a disgraced partisan hack." She also disputed that Trump had ever been soft on Russia.

“Unlike President Obama, who let Russia and other foreign adversaries push America around, President Trump has actually been tough on Russia,” Sanders said.