Three officers assigned to New Year’s Eve celebrations in the Times Square area of ​​New York City were injured by a machete-wielding teenager who expressed militant support for Islam, law enforcement officials said.

The attack happened shortly after 10 pm at West 52nd Street and 8th Avenue, just outside the checkpoints of the high-security zone set up for revelers, officials said at a meeting. Press conference early sunday.

The suspect approached an officer and tried to hit him in the head with the machete, Police Commissioner Keechant Sewell said. He then struck two officers in the head with the blade before being shot in the shoulder and taken into custody by police, Sewell said.

Three law enforcement officials with direct knowledge of the investigation said late Sunday that authorities were looking into whether the suspect reached for one of the officers’ service weapons during his takedown. The injured police officers were outside the hospital and were waiting to recover.

Authorities identified the suspect at the Press conference just like a 19 year old man. Four senior law enforcement officials said the man is Trevor Bickford of Wells, Maine.

The suspect was known to federal agents, who interviewed him in mid-December after a relative tipped them off about his revolutionary support for Islam, said four law enforcement sources briefed on the investigation.

His name is in a federal law enforcement database, they said, and investigators knew him from his social media posts. Bickford has no criminal record, the four officials said.

The man, who made pro-jihadist remarks from his hospital bed overnight, is believed to have traveled from Wells to lower Manhattan on Thursday primarily via Amtrak, those sources said.

Investigators were looking into whether he stayed at a downtown homeless shelter, the four officials said.

A journal found by investigators may have indicated that the suspect believed he was on a suicide mission: He left notes about who would inherit his belongings and where he wanted to be buried, the sources said.

The suspect told the newspaper that he regrets letting his mother down; he also wrote that he wanted his brothers to join him in his fight for Islam.

He had expressed some desire to travel to Afghanistan in the past, the officials said. Personal writings and terrorism-related propaganda were found in his backpack, they said.

Authorized FBI agents searched the man’s Maine home on Sunday, an agency spokesman said.

Neighbors told NBC affiliate wcsh the suspect is the son of divorced parents and has two brothers. He recently worked at an area country club as a groundskeeper, they said.

Bickford is a 2022 graduate of Wells High School, where he wrestled and played football, according to the station.

Several law enforcement officials said they were investigating whether the suspect traveled to New York specifically to attack police on New Year’s Eve.

The incident comes as the NYPD has seen other lone wolf terror-type attacks on officers. In Jamaica Queens in 2014, a radicalized man named Zale Thompson attacked three officers without warning with an axe, nearly killing one of the officers. In June 2020 in Brooklyn, Dzenan Camovic stabbed an officer in the neck, stole his gun, and used it to shoot responding officers in another jihadist-inspired lone wolf attack.

In Saturday’s attack, the officers were initially hospitalized, one with a fractured skull and another with a severe cut, Sewell said. In a later call, officials said the three officers had been released from Bellevue Hospital overnight.

Mayor Eric Adams said at the news conference that he had spoken with one of the injured officers. “He understood that his role saved the lives of New Yorkers today,” Adams said.

The investigation was still in its early stages.

Neither the FBI nor the New York police were looking for other suspects, authorities said.

The NYPD mounts a massive security operation every year during the New Year’s Eve celebrations, deploying thousands of officers to the area around Times Square.

Authorities expected up to 1 million people to throng the area, though police on Sunday did not have a more exact number.

Crowds are not allowed into the blocks to watch performances and the midnight ball drop without being checked at checkpoints where officers use metal detector wands to detect weapons.

Large bags and coolers are prohibited in the area, while barriers are in place to prevent vehicle attacks in the secure area.

Associated Press, alex lo Y denis romero contributed.