The alleged gunman who carried out a mass shooting has been caught and charged with terrorism, but in a strange twist to the fearsome episode, police sources have said that he himself was the likely source of the tip to a police hotline that led to his capture.
"We got him", New York Mayor Eric Adams announced on Wednesday after the manhunt in the rush hour shooting and smoke attack on a train in the city's underground train system ended.
Federal Prosecutor Breon Peace said that the alleged shooter, Frank James, 62, was charged with carrying out "terrorist attacks or other violence against a mass transportation system" on Tuesday.
James had posted several hate-filled screeds on social media against various communities and Adams.
Ten people were injured in the gunfire, five of them critically, and at least 13 others were hurt from smoke inhalation when he had set off a smoke canister before opening fire in a train car, and in the chaos that followed.
Police identified him as the suspect from a bank card and keys to a rented van that they found in a bag he had abandoned on the train.
"We were able to shrink his world," Police Commissioner Keetchan Sewell said of the manhunt with a $50,000 reward that brought in several tips to the police hotline.
Although it was not stated in the announcement of his arrest, police sources told media outlets that the tip that James was in a McDonald's restaurant came from him as the caller said something to the effect, "I think you are looking for me," before giving his whereabouts.
When police went to the restaurant, he was not there but they found him at a nearby street corner and he gave himself up peacefully.
Photographs after the arrest showed him smirking at the cameras.
New York City officials had said on Tuesday that the mass shooting was not being investigated as a terrorist incident, but the federal prosecutor, Peace, slapped the terrorism charge on James saying that he "committed a heinous and premeditated attack on ordinary New Yorkers".
James had left a long trail of hate messages with violent forebodings on social media going back several years.
Adams was critical of the social media companies who, he said, "had some responsibility".
"Why we're watching these postings and these threats every day, and no one is giving an early warning sign to law enforcement," he told CNN.
James's Twitter and Facebook posts have been taken down, but Rolling Stone magazine which reported on them on its website said that they included videos with headlines like "To kill or not to kill".
In one video he said, that 9/11 when terrorists struck New York City and the Pentagon was "the most beautiful day in the history of this country," according to Rollig Stone.
It said that he wrote nasty things about whites, Jews, Latinos and, even, fellow African Americans.
One of his targets was Adams for his campaign against crime and to move homeless people out of the transit stations and trains.
According to Rolling Stone, he referred to a mental health organisation that he said Adams was using for outreach to the homeless and said, "They made me more dangerous than I could ever..."
Apparently, he had been treated by them at some point.