One of two suspects in the shooting of a campus police officer is dead and a massive manhunt is under way for another, who is tied to the Boston Marathon bombing, police said today.

Shortly after the Massachusetts Institute of Technology officer was shot late last night, police got a report of a carjacking in Cambridge, just outside Boston.

Police said of the at-large suspect, "We believe this to be a terrorist."

Residents of the Boston suburb of Watertown have been advised to keep their doors locked and not let anyone in.

The Middlesex district attorney said the two men are suspected of killing the MIT police officer, then stealing a car at gunpoint and later releasing its driver unharmed.

Hours earlier, police had released photos of the bombing suspects and asked for public help finding them.

Authorities said the suspects threw explosives from the car as police followed it into Watertown. The suspects and police exchanged gunfire and one of the suspects was critically injured and later died.

Police say the suspect on loose is a "terrorist" who "came here to kill people".

The MIT officer had been responding to report of a disturbance when he was shot multiple times, according to a statement from the Middlesex district attorney's office and Cambridge police. It said there were no other victims.

In Watertown, witnesses reported hearing multiple gunshots and explosions at about 1am Friday.

State police spokesman David Procopio said, "The incident in Watertown did involve what we believe to be explosive devices possibly, potentially, being used against the police officers."

Boston cab driver Imran Sais said he was standing on a street corner at a police barricade across from a cafe when he heard an explosion.

"I heard a loud boom and then a rapid succession of pop, pop, pop," he said. "It sounded like automatic weapons. And then I heard the second explosion."

MIT said after the shooting that police were sweeping the campus in Cambridge and urged people to remain indoors. They urged people urged to stay away from the Stata Building.

Hours later, MIT, which has about 11,000 students, said the campus was clear but the gunman was still on the loose.

TV footage showed armed officers surrounding a suspect lying on the ground in Watertown outside Boston.

The bomb suspects' images came from surveillance cameras near the explosion sites shortly before the blasts near the marathon finish line.

FBI Agent Richard DesLauriers said: "We consider them to be armed and extremely dangerous."

Monday's blasts killed three and injured more than 180.

The images were released hours after President Barack Obama attended an interfaith service in Boston to remember the victims, including an eight-year-old boy.

The FBI's website crashed within moments of the images being released.

They show two young-looking men wearing baseball caps, jackets and carrying backpacks along the race route and weaving through the crowd.

"Each piece moves us toward justice," Mr DesLauriers said of the latest information to emerge.

He said one suspect is believed to have planted the explosive devices near the finishing line of the world-famous marathon.

The images came out hours after Mr Obama promised a grieving city those responsible would be hunted down.

At the interfaith service honouring the victims, the president called the perpetrators of the attack "these small, stunted individuals who would destroy instead of build".

The blasts killed eight-year-old Martin Richard, 29-year-old Krystle Campbell and Lu Lingzi, a graduate student from China. Seven victims remained in critical condition.

The bombs were crudely fashioned from ordinary kitchen pressure cookers packed with explosives, nails and ball bearings, investigators said. They suspect the devices were then hidden in duffel bags and left on the ground.

They exploded within 15 seconds of each other near the finishing line at a time when thousands of runners were pouring in.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.