NEW YORK CITY -- The Maine teen charged in the attack on three NYPD officers has made statements to investigators that strengthen the belief the attack was motivated by Islamic extremism, law enforcement sources told ABC News.
Trevor Bickford, 19, is expected to be arraigned on attempted murder charges soon. He remains hospitalized with a gunshot wound to the shoulder.
Bickford told police he took a sip of water and shouted "Allahu Akbar" before attacking the officers with a knife, sources said.
The knife, which NYPD officials said was old and rusty, was purchased in Maine, where Bickford also withdrew thousands of dollars in cash at some point before taking an Amtrak train to New York on Dec. 29. The withdrawal and the purchase suggest premeditation, sources said. Authorities believe Bickford has owned the weapon for about a year.
Upon arrival in New York the suspect made a large donation with the cash to the Bowery Mission, which investigators believe was meant to satisfy a Muslim tenet of charity.
From there, it's believed Bickford slept in a park in Forest Park, Queens. Police recovered a sleeping bag linked to the suspect, sources said. Investigators are interested in what brought him to the park in a remote part of the city and whether he intended to meet anyone.
Early Monday, authorities were in and out of the suspect's home in Wells, Maine.
Bickford was charged Monday afternoon with attempted murder of a police officer and attempted assault. He could still face federal terrorism charges.
The attack happened near 52nd Street and 8th Avenue just after 10 p.m. Saturday, less than two hours before the ball dropped in Times Square to ring in 2023.
Authorities say Bickford whipped out a machete and attacked the three officers, striking two of them in the head.
One officer suffered a fractured skull, another was treated for a bad cut. One is an eight-year veteran, and one of the others is a rookie officer who just graduated from the police academy on Friday.
Moments after the attack, Bickford was shot in the shoulder by police.
The three officers who were wounded are recovering at home.
The attack and sound of a gunshot briefly sent some people in the crowd running, but the incident did not impact the festivities in Times Square, which continued uninterrupted.
New surveillance video from inside Fiorintina's Pizza on Eighth Avenue captured the chaotic moments.
Staff and customers could be seen looking outside at what they thought were two people fighting.
"But after that we heard the gunshots and once I heard the gunshots, everyone was like rushing to the back of the building, people trying to get in, people trying to get out," owner Mike Sicilano said.
NYC Mayor Eric Adams said at a news conference Sunday that he had spoken to one of the wounded officers as he was being treated at the hospital.
"He was in good spirits," Adams said. "He understood that his role saved lives of New Yorkers today."
The attack is also being investigated as a possible incident of terrorism because of online postings Bickford made before the attack.
Investigators are looking at the possibility that he was radicalized by Islamic extremists, and they are looking into a handwritten diary found in his backpack.
"The last entry in there says, 'This is likely to be my final entry,' it's dated Dec. 31, 2022," said John Miller, CNN law enforcement and intelligence analyst and former deputy NYPD commissioner. "And it goes on to lay out, basically, a last will and testament: How to divide my belongings, what family members to give things to, where he wants to be buried-'not in the land of non-believers.'"
According to sources, the mother and aunt of Trevor Bickford notified law enforcement in recent weeks about their concerns he was gravitating toward dangerous Islamist ideologies.
After the suspect's mother flagged her son's gravitation toward Islamic extremism last month, the FBI interviewed Bickford and determined he sought to travel to Afghanistan to fight for the cause, law enforcement sources told ABC News.
Bickford was placed on a federal watchlist that would have prevented him from traveling overseas. There was nothing, however, to prevent him from boarding an Amtrak train to New York.
A neighbor in Maine, Steve Isles, told reporters Bickford has two brothers, and they're well known in the neighborhood.
"It's kind of hard to believe, I was just shocked, you know?" said Isles. "Wells is a very small community and you think, you know, 'Did this really just happen here?' My son Andrew went to high school with the boys. They weren't really close, they weren't close friends or whatever. But Wells has, you know, a really small school system. So everybody kind of knows everybody."
The Institute for Strategic Dialogue, a think tank that tracks and analyzes online extremism, terrorism and disinformation, released a briefing on the attack Monday, explaining that Jihadist groups were promoting low-tech attacks and targeting law enforcement in the runup to New Year's Eve.
"The attack follows a series of media announcements and propaganda from ISIS affiliates globally that were encouraging supporters to conduct lone actor attacks on targets such as airports and security services," ISD analysts wrote. "Most prominently, Islamic State supporters have recently been resharing content that was produced in 2016 at the height of the Islamic State's self-proclaimed caliphate, meant to inspire lone actors to conduct low budget or self-starting attacks by using knives, trucks, cars, and other rudimentary weapons in order to cause havoc in public settings."
Should authorities determine the attack was motivated by an Islamist ideology it would make it the first-ever terror incident associated with New Year's Eve in Times Square, something the NYPD and FBI have long feared and prepared for.
(The Associated Press contributed to this report.)