The suspect taken into custody for the stabbing of two New York City police officers may have ties to Islamic extremism.

Investigators are looking into whether the attacker, identified as Trevor Bickford of Maine, was a radical due to his recent activity online, police sources say. Bickford, 19, is accused of slashing two officers at a security checkpoint near Times Square on New Year's Eve.

A high-level police source also tells Fox News Digital that Bickford was being watched by the FBI's counterterrorism task force in the weeks leading up to Saturday's attack. The source also said Bickford recently converted to Islam and a tipster claimed he had expressed interest in going to Afghanistan.

A rookie officer, on his first night of policing, was slashed in the head, prompting another nearby officer to shoot Bickford. That officer was also struck, but he was not seriously injured. The rookie officer, identified by authorities only as Paul, is expected to recover.

NEW YORK CITY ALLEGED SUBWAY SHOOTER TO PLEAD GUILTY TO SHOOTING 10 PEOPLE IN APRIL: PROSECUTORS

"I want to be clear that the FBI, through the Joint Terrorism Task Force, is working very closely with [NYPD] to determine the nature of this attack," the FBI's Michael Driscoll said at a Sunday morning news conference. "And we will run every lead to ground. I also want to be very clear, as you've heard said tonight previously, this is very much an ongoing investigation so our ability to talk about specifics is limited."

NYC Mayor Eric Adams praised the response of the officers in Sunday morning's press conference. He added that all officers involved were in stable condition and are expected to recover.

"And as we do a preliminary review of the body cam video, we see how well these officers executed the plan that was put in place by the New York City Police Department in ensuring we protect those who came here to bring in a new year," he told reporters.

MULTIPLE NYPD OFFICERS STABBED WITH MACHETE NEAR TIMES SQUARE

Adams and other officials are expected to deliver further updates at a press conference later Sunday.

The attack was one of multiple instances of New Year's Eve violence across the U.S. A shooting in Mobile, Alabama, also sent partiers running late in the evening.

NYPD NYC

Authorities hold a press conference regarding the stabbing of two NYPD officers.

NYC weapon

The weapon Trevor Bickford allegedly used to stab two NYC police officers.

CLICK HERE TO GET THE FOX NEWS APP

Police are still investigating that incident, which left one person dead and nine injured.