The United Nations headquarters in New York City was locked down for several hours Thursday after a man was seen pacing outside one of its main gates with what police said appeared to be a shotgun.

Iran PressAmerica: The man, who appeared to be in his 60s, was taken into custody without incident at around 1:30 p.m., about three hours after police said he was first spotted outside a security checkpoint on Manhattan’s First Avenue.

During the standoff, the man held an object pointed at his own throat, possibly a firearm. The gates on the fence that rings the UN complex were closed, and the man didn’t appear to be trying to breach the security perimeter. Police said there was no danger to the public.

People inside UN headquarters were initially told to shelter in place, but were later allowed to move about the complex and come and go from other entrances. The UN General Assembly and Security Council were both in session Thursday.

UN spokesperson Stéphane Dujarric said there was “zero indication” the man was a current or former UN employee.

Details including criminal charges weren't immediately available.

"The individual is now in custody and there is NO THREAT to the public," the New York City police department said in a tweet just before 1:45 p.m.

Even after the tense standoff ended, police still urged New Yorkers to avoid the area around the Midtown East neighborhood of Manhattan where the United Nations is based.