NEW YORK (Reuters) - A gunman opened fire at a federal building in Lower Manhattan on Friday, fatally wounding a security guard before killing himself, officials said.

The suspect entered the building just after 5 p.m. (2100 GMT) and immediately shot the guard with a handgun, police said.

He then walked further into the building toward an elevator when he encountered another employee, said James O'Neill, chief of department for the New York Police Department. The gunman then shot himself in the head.

A police official identified the gunman as Kevin Downing, a man in his late 60s from Fort Lee, New Jersey, according to media reports.

Police said the motive of the shooting was still unknown but that the investigation was in its earliest stages.

"At this point there is no indication of a nexus to terrorism," O'Neill said.

The guard, who police said was armed but unable to return fire, went into cardiac arrest after being shot and died en route to Lenox Hill Hospital, a hospital spokeswoman said.

He worked for FJC Security Services Inc., a private company that has a contract with the building, which houses an immigration court and a U.S. Veterans Health Administration services office.

(Reporting by Laila Kearney and Katie Reilly; Writing by Frank McGurty; Editing by Sandra Maler and Mohammad Zargham)