A man who waved a large military knife at officers and is believed to have been radicalized by ISIS was shot and killed by police in Boston on Tuesday, according to officials. The suspect, identified as Usaama Rahim, 26, was under 24-hour surveillance by anti-terrorism authorities, said FBI Special Agent in Charge Vincent B. Lisi. Later Tuesday, authorities arrested a second man in connection with the case. The U.S. Attorney’s Office in Boston identified him as David Wright. He will appear in Boston federal court Wednesday, spokeswoman Christina Sterling said. “As of right now, we don’t think there is any concern for public safety,” Lisi said. Rahim was a subject of a terror investigation involving suspected Islamist extremists, law enforcement sources said. “We believe he was a threat,” Boston Police Commissioner Williams Evans said. “He was someone we were watching for quite some time.” Rahim had been under surveillance by the U.S. Joint Terrorism Task Force, officials said. Ibrahim Rahim, an imam at the Lighthouse Mosque in Oakland, California, earlier posted about his brother’s death on social media. Ibrahim Rahim wrote on Facebook that his brother was shot while at a bus stop on his way to work. He asked for prayers for his brother. In a 2013 interview with CNN, Ibrahim Rahim voiced his objection to presiding over the funeral of Boston Marathon bomber Tamerlan Tsarnaev. “We don’t want people looking at us as though we are empathetic in any way to what has happened at the hands of this man and his brother,” he said at the time. Ibrahim Rahim said his brother was on the phone with their father and was shot three times in the back during the confrontation. In a statement, the Islamic Society of Boston said police have invited Muslim leaders Wednesday to watch surveillance video of the shooting. “As religious institutions serving the Boston Muslim community, the Islamic Society of Boston (ISB) and Islamic Society of Boston Cultural Center (ISBCC) leadership are saddened to hear of the shooting of Usaama Rahim,” the statement said. “This tragedy has yielded many important questions that merit additional attention, and while we cannot expect all questions to be answered … our hope is that greater clarity and transparency will bring some peace to our congregation and the Boston community at large.” The ISBCC said that it had had a limited relationship with Rahim. A security firm it uses to provide security at the center hired him as a guard for a month in 2013. Rahim did not regularly pray at the center, nor volunteer or serve in any leadership position, the center said. The FBI-led task force had been watching Rahim and two associates also believed to be radicalized, according to a law enforcement official. Rahim had been monitored for at least a couple of years. Investigators were talking to the associates, and various locations in Massachusetts and Rhode Island were being searched, officials said. The FBI noted a recent change in the suspect’s behavior, including social media threats against police, which prompted agents to try to approach him Tuesday, according to the official. Evans said the shooting occurred about 7 a.m. after officers and FBI agents confronted Rahim, who suddenly turned around with a large black knife and lunged at officers and federal agents. The officers had not drawn their weapons at that point. The officers retreated and ordered the man to put down the weapon before they opened fire, Evans said. The shooting was captured by surveillance video and observed by witnesses. “Unfortunately, he came at the officers and, you know, they do what they were trained to do and, unfortunately, they had to take a life,” Evans said. Rahim was struck in the torso and abdomen. A Boston police officer and a federal agent opened fire on the suspect, Evans said. The shooting is under investigation.