FBI officials were so alarmed by President Donald Trump's firing of Director James Comey and other behaviors that they opened an investigation into whether the president had been working against U.S. interests on Russia's behalf, The New York Times reported Friday.

According to former law-enforcement officials and others familiar with the probe, the newspaper said, counterintelligence agents had to decide whether Trump's actions posed a possible national security threat. Investigators also had to ascertain whether the president was knowingly, or possibly unwittingly, under Russian influence.

One aspect of that investigation — whether Trump's firing of Comey represented obstruction of justice — has been previously reported.

The president's ties to Russia during the 2016 campaign had aroused suspicions among agents and senior FBI officials, who were unsure how to proceed with such a sensitive inquiry and thus chose to hesitate.

But Trump's activities before and in the aftermath of Comey's firing in May 2017 — in particular his linking of the firing to the Russia investigation — helped spur the investigation's counterintelligence aspect, the Times reported.

The inquiry is now part of special counsel Robert Mueller's broader investigation into the 2016 election and whether any of Trump's associates conspired with any Russian interference.

Whether Mueller is still probing the counterintelligence aspect of that inquiry remains unclear. But the Times noted that several former law-enforcement officials outside the inquiry wonder whether FBI agents overreached by launching it in the first place.

No evidence has been revealed publicly asserting that Trump had secret contact with or was influenced by Russian government officials, and spokespeople for both the FBI and special counsel's office refused to comment.

"The fact that it goes back a year and a half and nothing came of it that showed a breach of national security means they found nothing," said Rudolph Giuliani, a lawyer for the president.