Police say one of two suspects in the shooting of a Massachusetts Institute of Technology police officer is dead and a massive manhunt is underway for another, who is believed to be tied to the Boston Marathon bombing.

Shortly after the MIT officer was shot dead Thursday night, police got a report of a carjacking in Cambridge, just outside Boston.

One of the two suspects in the officer’s shooting was killed. The second got away and police described him as a “terrorist” who “came here to kill people.”

The search for that suspect is centered on Watertown, a city west of Boston next to Cambridge.

One police radio transmission said that suspect was thought to be the man in the white hat shown in photos of suspects in the Boston Marathon bombing that killed three and injured more than 160 on Monday. The FBI released photos of the suspects on Thursday.

Early Friday morning, dispatchers warned police officers searching for that second suspect that the first had an explosive device in his possession. Residents of Watertown were also warned to stay inside their homes and to only open the door to police officers. A police bomb squad was looking for explosive devices along the route of the chase.

The FBI said it is working with local authorities to determine exactly what happened Thursday night.

The shooting on MIT’s Cambridge campus was followed shortly by the reports of the violence in Watertown. Authorities said after the officer was shot, a carjacking took place. The carjack victim was let out at a gas station a half hour later, but police spotted the vehicle and chased it from Cambridge to Watertown, where apparently explosive devices were tossed from the vehicle and more than two dozen shots were fired.

Another police officer was wounded during the chase.

The MIT officer had been responding to report of a disturbance Thursday night when he was shot multiple times, according to a statement from the Middlesex district attorney’s office and Cambridge police.

In Watertown, witnesses reported hearing multiple gunshots and explosions at about 1 a.m. Friday. Dozens of police officers and FBI agents were in the neighborhood and a helicopter circled overhead.

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 Saif said he was standing on a street corner at a police barricade across from a diner 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.”

He said he could smell something burning and advanced to check it out but area residents at their windows yelled at him, “Hey, it’s gunfire! Don’t go that way!”

MIT said right after the 10:30 p.m. 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, a mixed-use building with faculty offices, classrooms and a common area.

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

Otto Warmbier was arrested in January 2016 at the end of a brief tourist visit to North Korea. He had been medically evacuated and was being treated at the University of Cincinnati Medical Center when he died at age 22.