A top police official said Monday that the NYPD is prepared for "the single-largest and most-complicated security undertaking" in its history but authorities are ready to adjust on the fly to protect Pope Francis on his visit to New York City this week.

Speaking on NBC's "Today" show, NYPD deputy commissioner for counterterrorism and intelligence John Miller was asked if officials were "comfortable" with the possibility of the Pope ad-libbing, perhaps stepping from his motorcade to mingle with the masses.

Miller said that when the pope wants to "hop out of the car" it "really doesn't matter whether we are comfortable."

See alsoComplete coverageInteractiveYour messages to the popeSee alsoPope's visit: Follow along at News 12

He's the pope, Miller said. "We have a plan," he said, "If we have to divert from the plan we will."

Miller said the biggest challenge is that the papal visit coincides with the meeting of the U.N. General Assembly with 170 world leaders in New York, as well as an expected visit by President Barack Obama.

As a result, Miller said, security will be multi-layered, from the highly visible presence of thousands of uniformed police officers to the security measures that will go largely unseen -- from plainclothes officers to surveillance cameras.

advertisement | advertise on newsday

"There will be a lot of eyes," he said, "and a lot of things in the background."

With so many hotels in midtown Manhattan with a line of sight to St. Patrick's Cathedral, security officials will be doing discreet checks of their guest lists in advance of Pope Francis' visit to the city, said a law enforcement official familiar with security preparations said earlier.

The hotel checks are one of a number of security measures being taken for the pope's 39-hour trip to the Big Apple, during which he will say prayers at the vespers service at St. Patrick's on Thursday, then address the United Nations General Assembly, visit a Bronx parochial school and hold Mass at Madison Square Garden the next day.

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

Security preparations for the papal visit has turned into what NYPD Commissioner William Bratton believes is the largest security challenge the department and city have ever faced.

"We are very confident we will have a safe event for all those coming," Bratton said last week.

The pope's visit and UN meeting have been designated a national security event by the federal Secret Service, which is the lead agency coordinating security arrangements.

Officials last week stressed that there is no known credible threat involving Pope Francis or the UN meeting.

However, Rep. Peter King (R-Seaford) told Newsday that the federal joint terrorism task force investigated a man at a location outside New York City who had made threatening remarks about the pope. The threats weren't connected to any terrorism but were more along the lines of venting anger, said King, who declined to elaborate. FBI officials last week also declined to discuss the matter.

advertisement | advertise on newsday

While three previous popes have visited the city since 1965, when Pope Paul VI became the first pontiff to do so, Francis represents unique challenges because of his freewheeling nature and desire to be close to the people.

He will be bringing his own vehicle from Rome, reportedly a modified Jeep Wrangler, for the ride through Central Park. Francis is likely to get close to people, a situation which police and federal officials are anxious about.

"In the course of his time here, he will be exposed to hundreds of thousands of people," Bratton said.

While Bratton joked last week about the pope having to pay his fare if he rides the subway, a church official in New York said privately that it is highly unlikely that Francis would attempt do so.

The NYPD expects to have about 5,000 officers assigned to the papal visit and UN General Assembly events. Some of that deployment will be covered by overtime expense, to which Bratton would only say "the cost will be what it is."

advertisement | advertise on newsday

Police are also assigning a lot of hardware and vehicles to cover the events. Scores of emergency service vehicles are being marshaled. They contain an array of chemical, biological and radiation detectors. Individual cops will also be wearing smaller detectors with their uniforms.

Tactical officers assigned to the newly formed special response group, a unit of about 450 made possible by the addition of more than 1,200 new cops, will have access to heavy weapons and combat gear. Police aviation and harbor units also will be deployed, as will canine and mounted units.

Each of the airborne and harbor units also will carry radiation detectors to provide a wider sweep for monitoring. The city Office of Emergency Management will be open round-the-clock for Francis' visit to coordinate city responses to emergencies such as power outages and water main breaks, said OEM chief Joseph Esposito.

In fact, a power outage was part of one recent exercise conducted at police headquarters to test the response of police and emergency services during the week of heightened security.