BOSTON (Reuters) - Law enforcement officers in Boston shot dead a man on Tuesday who came at them with a large knife when they tried to question him as part of a terrorism-related investigation, authorities said, describing him as a "threat."

The 26-year-old man, identified as Usaamah Rahim, brandished a knife and advanced on officers working with the Joint Terrorism Task Force who initially tried to retreat before opening fire, Boston Police Superintendent William Evans told reporters.

"We believed he was a threat," Evans said. "The level of alarm brought us to question him today. I don't think anyone expected the reaction we got out of him."

FBI special-agent-in-charge Vincent Lisi said the subject had been under 24-hour surveillance but declined to provide any details of what investigators had learned about his activities.

"We don't think there's any concern for public safety right now," Lisi said.

Suffolk County District Attorney Dan Conley said his office would investigate whether the shooting was justified.

Evans said officers had approached the man in a strip-mall parking lot without weapons drawn and opened fire only after he repeatedly advanced on them, leaving them in fear for their lives.

"The FBI and the Boston Police did everything they could to get this individual to drop his knife," Evans said. "They kept retreating, verbally giving commands to drop the weapon."

A man who identified himself on Twitter as Rahim's brother said the family was shocked by the shooting.

"We are deeply grieved by the loss," Ibrahim Rahim said.

(Reporting by Scott Malone)