The Hub stopped Friday.

The kinetic and salty city of Boston, which got its proud nickname from Oliver Wendell Holmes in the 19th century, came to a standstill Friday while an army of heavily armed police hunted for a skinny 19-year-old in a gray hoodie.

By order of the state, a public transit system that serves more than 1.3 million riders a day was padlocked. Amtrak trains were suspended between Boston and New York. Businesses, offices and some of the world’s greatest universities were shut. Taxis were ordered off the streets for part of the day. Residents were instructed to stay inside.

Dutifully but pointlessly, traffic lights clicked from green to yellow to red on the deserted streets of Kenmore Square, in the shadow of the famous Citgo sign just beyond the Green Monster in Fenway Park.

The Red Sox and Bruins postponed their Friday night games.

On a cloudy and warm spring day, even the Charles River was empty of the rowing sculls and puffy white sails that form the Beantown backdrop for millions of charming tourist photos.

At a news conference shortly after 6 p.m., Gov. Deval L. Patrick (D) lifted the lockdown but urged people to “remain vigilant.” Three hours later the suspect, Dzhokhar Tsarnaev, was taken into custody after he was discovered hiding in a boat stored in the driveway of a house in the suburb of Watertown.

But for one long Friday, Boston and its ring of inner suburbs were “a ghost town,” according to Tom LeBlanc, 43, a general contractor from Waltham, a city adjacent to Watertown.

“Even in a big snowstorm, you usually see a plow or a couple of nitwits walking along. Something. But there’s nothing. It’s an eerie sight,” said LeBlanc, who ran the Boston Marathon on Monday and was stopped by police a half-mile before the bombed-out finish line.

John Fox, the official historian of the FBI, said that the shutdown of such a major city was virtually unprecedented in recent U.S. history. He said the aftermath of Sept. 11, 2001, attacks was far bigger, knocking New York and Washington on their heels and clearing the airspace over the entire United States.

But beyond that, Fox said, a city shutdown has “only happened on a smaller scale.”

The Oklahoma City bombing in 1995 (which happened on April 19, Friday’s date) was far deadlier and devastated the city center. But the government didn’t order a far-reaching lockdown.

Other manhunts and events have terrorized and paralyzed cities, including in 2002 during the Washington sniper attacks. But rarely, if ever, has a large U.S. urban area come to such a complete and utter halt as happened Friday in Boston.

Fox said the closest recent parallel might be in London after the July 7, 2005, transit system attacks that killed 52 passengers and four bombers, and injured more than 700 others.

London was badly disrupted, with trains and buses out of service, and schools and many businesses were closed. But the city was back on its feet almost immediately, with a sentiment summed up by Ian Blair, then the head of Scotland Yard.

“If London can survive the Blitz,” he said, “it can survive four miserable bombers like these.”

Shortly after 8 a.m. Friday, Patrick and police officials announced that residents of Allston, Belmont, Brighton, Cambridge, Newton, Waltham, Watertown and the entire city of Boston should stay indoors.

“Residents should not answer the door unless it is a police officer, and are advised to stay away from windows,” a notice from the governor’s office said. “All businesses in these towns will remain closed until further notice. People should not congregate outside. Residents and businesses should monitor media for further information.”

Signs in the Callahan Tunnel, a major connector between Logan Airport and the city center, announced the stay-home policy in flashing lights: “Shelter in Place is in effect in Boston.”

Across the city and its suburbs, people were awakened by early-morning “reverse 911” calls from police, telling them to stay indoors.

Bernard Ohnemus, 80, was awakened by one of those calls at 6:45 a.m. at his home in Waltham. He received a second call an hour later, with a recording urging people to keep an eye out for “a brown-eyed, brown curly-haired white male in a gray hoodie.”

Ohnemus said he and his wife, Pat, were spending the day cleaning up the house and keeping up with events on television.

“I’m looking at all of these SWAT guys and I’m thinking to myself, if they ever want to put down an insurrection, they have an army here,” he said. “You don’t realize how many cruisers there are.”

Twitter, Facebook and other social-networking sites buzzed with news of the Boston shutdown.

One resident of Cambridge tweeted: “I fell asleep to the sound of helicopters overhead and woke up to this on my front door- whoa.”

She attached a photo of a piece of paper — dated April 19 at 6:39 a.m. — that said: “This is an important message from the City of Cambridge: Due to the ongoing police investigation in Watertown and the surrounding area, police are advising residents to shelter in place.” It added, “Please stay vigilant and call 9-1-1 immediately if you witness any suspicious activity.”

Norfolk Street in Cambridge, where the Tsarnaev family lives, bristled with activity as police surrounded the house and cleared the street.

When police knocked on Vanessa Buttolph’s door and told her to leave, she grabbed what was dearest to her: her viola.

“It’s the most important thing I own,” the musician, 24, said.

The police also knocked on the door of Tim Fiedler, 23, who lives on Norfolk Street.

“When big men with guns and bulletproof vests order you to get out, you get out,” he said.

Although almost everyone complied with the shutdown orders Friday, a few people staged quiet rebellions. Shortly after noon, a sole jogger ran along Memorial Drive on the banks of the Charles. One other person rode a bike nearby.

In the otherwise shuttered Harvard Square in Cambridge, Paul Spagnuolo manned a newsstand that remained open for business in the rushless morning rush hour.

“We don’t let anything, even crazed bombers, get in our way,” he said.

Later in the morning, his stand was closed and empty.

Sullivan reported from Washington. Mary Beth Sheridan in Cambridge, Dan Keating in Boston and Masuma Ahuja in Washington contributed to this report.