"We had to act quickly yesterday because he was in fact putting this bomb together. He was drilling holes and it would have been not appropriate for us to let him walk out the door with that bomb," Kelly said.
The police commissioner said Pimentel was energized and motivated to carry out his plan by the Sept. 30 killing of al-Qaida's U.S.-born cleric Anwar al-Awlaki.
"He decided to build the bomb August of this year, but clearly he jacked up his speed after the elimination of al-Awlaki," Kelly said.
Ten years after 9/11, New York remains a prime terrorism target. Bloomberg said at least 13 terrorist plots have targeted the city since the Sept. 11 attacks. No attack has been successful. Pakistani immigrant Faisal Shahzad is serving a life sentence for trying to detonate a car bomb in Times Square in May 2010.
Pimentel, a U.S. citizen originally from the Dominican Republic, Pimentel was "plotting to bomb police patrol cars and also postal facilities as well as targeted members of our armed services returning from abroad," Bloomberg said Sunday.
He was under surveillance by New York police for at least a year who were working with a confidential informant and was in the process of building a bomb; no injury to anyone or damage to property is alleged, Kelly said. In addition, authorities have no evidence that Pimentel was working with anyone else, the mayor said.
"He appears to be a total lone wolf," the mayor said. "He was not part of a larger conspiracy emanating from abroad."
Instead, Bloomberg said, Pimentel represents the type of threat FBI Director Robert Mueller has warned about as U.S. forces erode the ability of terrorists to carry out large scale attacks.
Pimentel, also known as Muhammad Yusuf, is accused of having an explosive substance Saturday when he was arrested that he planned to use against others and property to terrorize the public.
The charges accuse him of conspiracy going back at least to October 2010, and include first-degree criminal possession of a weapon as a crime of terrorism, and soliciting support for a terrorist act. He was ordered held without bail at his arraignment later Sunday.
"This is just another example of New York City because we are an iconic city ... this is a city that people would want to take away our freedoms gravitate to and focus on," Bloomberg said.
Kelly said a confidential informant had numerous conversations with Pimentel on Sept. 7 in which he expressed interest in building small bombs and targeting banks, government and police buildings.
Pimentel also posted on his website trueislam1.com and on blogs his support of al-Qaida and belief in jihad, and promoted an online magazine article that described in detail how to make a bomb, Kelly said.
Among his Internet postings, the commissioner said, was an article that states: "People have to understand that America and its allies are all legitimate targets in warfare."
The New York Police Department's Intelligence Division was involved in the arrest. Kelly said Pimentel spent most of his years in Manhattan and lived about five years in Schenectady. He said police in Albany tipped New York City police off to Pimentel's activities.
Asked why federal authorities were not involved in the case, Manhattan District Attorney Cyrus R. Vance Jr. said there was communication with them but his office felt that given the timeline "it was appropriate to proceed under state charges."
About 1,000 of the city's roughly 35,000 officers are assigned each day to counterterrorism operations. The NYPD also sends officers overseas to report on how other cities deal with terrorism. Through federal grants and city funding, the NYPD has spent millions of dollars on technology to outfit the department with the latest tools from portable radiation detectors to the network of hundreds of cameras that can track suspicious activity.