A helicopter has crashed on the roof of a high-rise building in New York City, causing a fire and killing the pilot, local officials say. There is no indication of a link to terrorism.

The accident happened just before 2 p.m. on Monday when the aircraft crashed on the roof of 787 Seventh Avenue in Midtown Manhattan, a 54-story office building near Times Square.

“We felt a jolt in our building and shortly after got the instruction to evacuate,” one person who was inside the building said on Twitter. Thousands of people were evacuated as a precaution.

A fire broke out as dozens of emergency workers rushed to the scene, but the flames were quickly contained and fully extinguished by 2:30 p.m. The pilot, who was the only one on board, was killed in the crash.

There was no immediate word on the cause of Monday’s crash, but videos which were taken by a witness showed the helicopter flying erratically in the minutes before it crashed.

New York Governor Andrew Cuomo said there was no indication of a link to terrorism, and one source said the helicopter appeared to have suffered mechanical problems.

The helicopter, an Agusta A109E helicopter, had taken off from the East 34th Street Heliport on the east side of Manhattan. It was reportedly flying to the Statue of Liberty.

Video shows moments before the scrash

NEW: Video shows helicopter flying erratically before crashing on the top of a high-rise building in New York City pic.twitter.com/Nd2w39up1Q — BNO News (@BNONews) June 10, 2019

Breaking News: A helicopter crash lands into the roof of a Midtown Manhattan building.

Roof not equipped with landing pad. One person injured. @CBSLA #KCAL9 #HelicopterCrash pic.twitter.com/BBi7uvLrYQ — Juan Fernandez (@NewsJuan) June 10, 2019

Evacuation in Midtown West. 51st Street and 6th Ave near Radio City Music Hall and Rockefeller Centre.



We felt a jolt in our building and shortly after got the instruction to evacuate. #NYC #Evacuation #Midtown pic.twitter.com/lH2YwilqqJ — Javanni. (@JavanniWaugh) June 10, 2019