Updated

DEVELOPING: The man shot and killed Tuesday by Boston police was plotting with another suspect to behead a cop, a law enforcement source told FoxNews.com

The dead suspect, 26-year-old Usaama Rahim, was under surveillance by the Joint Terrorism Task Force when he was shot at about 7 a.m. near a CVS in the city's Roslindale neighborhood, when he brandished the blade at police. Later Tuesday, authorities arrested another suspect, David Wright, in connection with the case, police said.

"We believe the intent was to behead a police officer," one official told The Boston Globe. "We knew the plot had to be stopped. They were planning to take action Tuesday."

Rahim was shot outside a CVS Pharmacy in Roslindale, Mass. at approximately 7 a.m. Tuesday.

Boston Police Commissioner William Evans told reporters that members of the Joint Terrorism Task Force approached Rahim to question him about "terrorist-related information" they had received when he moved toward officers with the knife.

More On This...

    Evans said officers repeatedly ordered Rahim to drop the knife but he continued to advance. He said task force members fired their guns, hitting Rahim once in the torso and once in the abdomen. Rahim was taken to Brigham and Women's Hospital, where he was pronounced dead.

    Later, the FBI and local police arrested a man at a home in Everett, Mass., in an action authorities said was related to the Roslindale shooting. Christina Diorio-Sterling, a spokeswoman for U.S. Attorney Carmen Ortiz, said Wright was taken into custody from his home in suburban Everett. She said Wright will face federal charges and is expected to appear in U.S. District Court on Wednesday.

    WFXT reported that three different Joint Terrorism Task Force teams had been carrying out 24-hour surveillance on at least three different people in the Boston area, though it was unclear how long that had been going on.The plot may have been inspired by the terror group ISIS, who have repeatedly called on followers in the United States to attack law enforcement officials or military installations.

    Evans did not comment on the report that Rahim had been radicalized by ISIS, but said "Obviously, there was enough information there where we thought it was appropriate to question him about his doings ... He was someone we were watching for quite a time."

    Evans said the officers didn't have their guns drawn when they approached Rahim. He said police have video showing Rahim "coming at officers" while they are backing away. That account differs from one given by Rahim's brother Ibrahim Rahim, who said in a Facebook posting that his youngest brother was killed while waiting at a bus stop to go to his job.

    "He was confronted by three Boston Police officers and subsequently shot in the back three times," he wrote. "He was on his cellphone with my dear father during the confrontation needing a witness."

    There is surveillance video from the scene which will be released after Rahim's family and civil rights advocates view the footage.

    The officer and the agent involved in the shooting weren't physically injured but were evaluated at a hospital for what Evans described as "stress."

    WFXT reported that Rahim worked in loss prevention at several CVS stores in the Boston area. However, it was not clear that the store where he was killed was among them. Boston voter registration records seen by the Associated Press list Rahim as a student. Other records indicate that as recently as two years ago he was licensed as a security officer in Miami, but don't specify in what capacity.

    The Islamic Society of Boston Cultural Center said its security firm hired Rahim as a security guard for a month in mid-2013. Executive director Yusufi Vali said Rahim didn't regularly pray at the center and didn't volunteer there or serve in any leadership positions.

    The FBI and Rhode Island State Police also searched a property in Warwick, R.I. in relation to the Roslindale shooting. Police sealed off a street, requiring anyone who lived there to show identification to pass the police cordon, but it was not clear if they had anyone in custody.

    A 17-year-old told the Boston Globe that police had asked him about a neighbor in his mid-20s named Nick. The teen told the paper Nick often wears long robes and prays in his front yard.

    The Associated Press contributed to this report.

    Click for more from MyFoxBoston.com.

    Click for more from The Boston Globe.