It happened inside the lobby of 201 Varick Street at about 5:05 p.m. The building is located near the intersection with West Houston in the West Village.
Friday night, officials identified the gunman as 68-year-old Kevin Downing of Fort Lee, New Jersey.
During a news conference, NYPD Chief of Department James O'Neill said the gunman walked into the federal building and walked toward a metal detector in the security screening area. He then pulled out a handgun and shot the security guard at close range.
O'Neill said the gunman then walked past the screening area toward the elevators and encountered an employee who is not a guard. The gunman then turned the gun on himself and shot himself in the head.
The victim has been identified as 53-year-old Idrissa Camara.
CLICK TO VIEW PHOTOS FROM THE SCENE
Camara, was rushed to the hospital, where he died a short time later.
The following is a statement from Michael McKeon, spokesman for FJC Security Services:
"Tonight, for the first time in our 27-year history, FJC Security Services lost a member of our family when Senior Guard Idrissa Camara was shot at 201 Varick Street. He later died at Lenox Health Greenwich Village.
"Idrissa Camara, 53, of Manhattan, worked for FJC for two years, when we took over the contract at that building. He worked for the prior company and we were pleased he stayed with us during that transition.
"Camara, who was armed, was an extraordinary Senior Guard who was well trained, cared deeply about his job and knew that building better than anyone else. It's clear from the facts that he never had a chance to defend himself in this instance.
"Camara was scheduled to complete his day at 4:00 PM, but agreed to stay on for extra duty. That speaks volumes about the person he was.
"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.
"As part of our investigation, we have checked our records for any link between the shooter and FJC. Our search found no connection."
Downing was pronounced dead at the scene.
There was a significant police presence moments after the shooting. The chaotic scene was captured on video:
And another from when everything was first starting and the building was being notified pic.twitter.com/QPgiV2IJ6r— Jacque Schindele (@Jacque_s_) August 21, 2015
Chief O'Neill said there is no indication that this is tied to terrorism, based on the initial investigation. That was confirmed by Jeh Johnson, Secretary of Homeland Security who rushed to the scene from New Jersey to help with the investigation and give his support to the victims.
"I wanted to be here, because this is a federal building. And check on our employees here and to be with those employees in the face of this tragedy," said Jeh Johnson, Secretary of Homeland Security.
Federal authorities are taking no chances, though, checking rooftops and area buildings, sources said. The FBI has been called in to help with the investigation.
Because Camara was a security guard under contract to the Department of Homeland Security, his death constitutes a homicide of a federal officer.
The federal building is a large block-long federal building housing several agencies, including a passport office and a post office.
Traffic in the area was blocked off, but traffic is now allowed to continue through the area.