The US city of Boston and surrounding area have been locked down amid a massive manhunt for a second suspect in the Boston Marathon bombing, after the first suspect died following a shootout with police.

"The shelter in place recommendation has been extended throughout the city of Boston," Ed Davis, police commissioner for Boston, said on Friday.

"We are working very closely with federal authorities in Washington. We are examining all databases, all potential leads," he said.

"If you see anything suspicious, let us know."

The huge police operation started after a police officer was killed at the nearby MIT university campus late on Thursday.

Police were conducting a door-to-door, street-by-street search on Friday due to what they called a fluid situation.

NBC and the Associated Press news agency reported that the suspects were originally from Russian region near Chechnya.

The New York Times newspaper's website, quoting a US law-enforcement official, identified the surviving suspect as 19-year-old Dzohkar A Tsarnaev of Cambridge. His brother, Tamerlan Tsarnaev, the other suspect, was killed in a gun battle with police overnight.

Residents warned

Massachusetts state police warned local residents not to open their doors while the hunt for the second suspect was under way

"We believe this to be a terrorist," Davis, Boston police commissioner, said.

"We believe this to be a man who has come here to kill people. We need to get him in custody."

The US Federal Bureau of Investigation had earlier released pictures and video of the bombing suspects, enlisting the public's help in identifying two men wearing backpacks and baseball caps in the crowd minutes before bombs exploded near the finish line.

Boston police said on Friday that all transit service by the Massachusetts Bay Transportation Authority "has been suspended until further notice" as a manhunt for a suspect was ongoing.

Vehicle traffic was also suspended in and out of Watertown, Boston police said.

The captured suspect died while in hospital after a firefight with police on Friday.

"For public safety ... we are asking everyone to shelter in place for the time being," the official said.

Doctors at the Beth Israel Deaconess Medical Centre said that police brought a suspect in with injuries at 1:20am local time (0520 GMT).

He died shortly from multiple bullet wounds and what appeared to be a blast injury.

Earlier on Thursday evening, a police officer for the Massachusetts Institute of Technology (MIT) was killed at the school's Cambridge campus, prompting a manhunt in a community on edge just days after the Boston Marathon bombing.

MIT said early on Friday that the university's police had determined that the suspect in the shooting was no longer on campus and it was now safe to resume normal activities.

Motive unknown

Massachusetts state police and Cambridge local police said they were assisting in the investigation.

Procopio said the motive for the shooting was not known and the investigation would be led by the Middlesex county district attorney's Office after the death of the officer.

Greg Comcowich, FBI Boston special agent, said the office was referring questions about the shooting to Cambridge and MIT police.

"I can tell you that we are aware of it however."

The shots on Thursday night were reported near Building 32, MIT said in an emergency statement warning students to "stay indoors and away from the area."

MIT police representatives could not be reached immediately for comment.