A man from Maine who now lives in Watertown, Mass., spent a harrowing night and day as police exchanged gunfire with the two suspects in the Boston Marathon bombings.

Joseph Gagnepain, 32, who grew up in New Vineyard, said he and his three roommates spent most of Thursday night holding swords — which he had won in ju-jitsu competitions — while standing watch at the three entrances to their home on Lincoln Street, just three or four blocks from the gun battle.

Gagnepain said he tried to go out to a convenience store about 11:30 Thursday night and saw more than 100 police cruisers go by. He said it took them more than a minute to pass at about 45 mph.

Seeing the size of the police presence, he returned home, where he and his roommates tuned in to a police scanner to monitor the situation. They were concerned about the house’s three doors, he said, which have glass panes.

“Anyone could come in,” he said. “We had a person posted at each door, watching out the window.”

Gagnepain acknowledged that the swords weren’t an ideal defense against a potential intruder with a gun.

“But I don’t have a firearm in the house,” he said. “We each had a sword at a doorway, which feels ridiculous. It’s scary.”

Early Friday morning, about 50 SWAT team members did a door-to-door search in the area. Gagnepain and his roommates allowed five officers to search their house, including the basement, which Gagnepain said was a particular concern because it has an exterior door and could have been an entry point.

“They were going into every single home and checking every room,” he said. “There were armed SWAT guys combing every single backyard and going through every trash can.”

Any resident who tried to leave a home during the lockdown was quickly confronted by officers, Gagnepain said.

“One of the people tried to bring them coffee, but they weren’t having it,” he said. “They’d yell at you and tell you to get back indoors.”

After the confrontation ended with one of the suspects dead, Watertown became the focus of a manhunt for the other, 19-year-old Dzokhar Tsarnaev.

The manhunt prompted authorities to take security measures that disrupted everyday life for thousands, including several Maine natives.

Logan Leavitt, 20, of Portland, was supposed to be on a train to New York City Friday morning. Alex Lowe, of Saco, should have been in a politics class at Bentley University. Danielle Tourigny, of Biddeford, had a final exam to take. And when Seth Robertson, a UMaine graduate, heard the news, he was getting ready to go to work.

Instead, the Mainers — like most Boston residents Friday morning — waited anxiously as law enforcement sought the surviving suspect.

“People have a sense of fear, and a sense of the unknown,” said Leavitt, a 20-year-old Portland resident who is studying journalism at Emerson College. “The city is (on) complete lockdown.”

Leavitt had planned to board an Amtrak train about 5:30 a.m., but watched as police methodically shut down the city’s transit system and ushered him and scores of others into taxis to return home.

He described an eerie scene near Boston’s South Station, steps from the usually bustling financial district. After police ordered residents to stay indoors and businesses to shut down, the streets were empty, Leavitt said. “There’s literally no cars on the road.”

Michelle LaPointe, a former Hallowell resident, said she heard helicopters over her home in Cambridge, Mass., on Thursday night, but didn’t realize until Friday morning that they were involved in the manhunt.

LaPointe, a graduate of Hall-Dale High School and Bowdoin College, said the bombing suspects lived two streets away from her, about half-mile from her home, which is about a half-mile from the Massachusetts Institute of Technology, where a campus police officer was shot and killed by the suspects.

Robertson, who graduated from UMaine in 2006 and has lived in Boston ever since, works at Northeastern University, which was closed Friday because of the lockdown. He sat glued to his Twitter feed and the local news stations as law enforcement swarmed through the city.

“Boston is pretty much completely on hold right now,” said Robertson, 29. “There are a couple of cars driving down the street, but for the most part it’s a ghost town over here.”

Lowe, 19, a freshman at Bentley University in Waltham, Mass., said he woke up around 7:30 Friday morning and had multiple email messages from college administrators canceling classes as the manhunt continued in the Watertown area, one town from his campus.

“I’ve heard a few times police sirens driving past the university in the direction of Watertown,” said Lowe. “It is definitely nerve-wracking. We don’t plan on going anywhere.”

Tourigny, the Biddeford resident who graduated from Cheverus High School, is in her second year at Northeastern.

She was scheduled to take a statistics final Friday, but it was postponed indefinitely. Tourigny woke up at 8:30 a.m. to her roommate screaming.

“She was saying that the university was closed, the entire city is closed and there is a man with a bomb on the loose,” Tourigny said.

Initially skeptical, she checked her computer and found that her roommate wasn’t exaggerating. From Tourigny’s vantage point on the ninth floor of her dormitory, the city looked deserted.

“I have literally not seen a person this entire time,” she said Friday afternoon. “The only cars that have gone by are police cars with sirens on — and also helicopters.”

Tourigny’s dorm room faces west, in the direction of Cambridge and Watertown, and the police cruisers were heading that way, she said.

“Hopefully I get to leave the building soon. I’m getting a little stir crazy in here,” she said.

Fellow Cheverus graduate Paige Lucas, a sophomore at Tufts University in Medford, Mass., woke at 6:45 a.m. Friday to an automated telephone call from the school announcing that the subway system was closed for the day.

A quick check of her emails showed that classes were canceled and students were told to stay on campus and indoors as much as possible.

“It’s kind of like a ghost town,” said Lucas. “My friends are definitely scared and stuff.”

Many of the dining hall workers couldn’t make it to work Friday, she said. Lucas, who works for the dining service but wasn’t scheduled to work, pitched in with other students to help run the dorm’s cafeteria.

Medford is about five miles from Watertown, but Lucas said one of her friends who was up late Thursday night “heard the explosions in Watertown when they were throwing the grenades in the street.”

Staff Writers Matt Byrne and David Hench contributed to this report.