A gunman slipped through a side door of a federal building in Manhattan late Friday afternoon and shot a security guard in the head, killing him, before turning the weapon on himself, police said.

Detectives are investigating what prompted the shooting of FJC Security Services guard Idrissa Camara, 53. The gunman had no apparent ties to the company, FJC said in a statement.

Kevin Downing, of Fort Lee, New Jersey, entered through a side entrance of the building on Varick Street that houses an immigration court, passport processing center and a regional office for the Department of Labor, a law enforcement official said. The official was not authorized to speak publicly and spoke to The AP on condition of anonymity.

He shot Camara at close range, then walked through the screening area and headed toward an elevator where he encountered another employee, and then shot himself in the head, said James O’Neill, a chief with the New York Police Department. Downing was pronounced dead at the scene. It appears the gunman acted alone, and O’Neill said there was no indication the shooting was terrorism.

Camara, 53, was supposed to have gotten off work at 4 p.m. but agreed to stay on for an extra shift, FJC Security Services said. He was pronounced dead at a nearby hospital.

The senior guard was armed, but had never had a chance to defend himself, according to the company.

"Camara … was an extraordinary Senior Guard who was well trained, cared deeply about his job and knew that building better than anyone else," said Michael McKeon, a spokesman for the security company.

"Our thoughts and prayers are with his wife and family. We intend to do everything we can to stand with them during this very difficult time."

Hector Figueroa, the president of Camara’s union 32 BJ SEIU, said his was horrified by the news.

"Security officers around the city and country serve on the front line each and every day to keep us safe and secure," Figueroa said. "We are heartbroken that one of our own has fallen. We hope some of our questions in the face of this terrible tragedy will be answered. For now, we are keeping Camara’s family and loved ones in our thoughts and prayers."

Employees at the building said they were told to get down on the ground when the shots rang out. A short time later, the building was placed on lockdown and then evacuated.

(Copyright (c) 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox