David Grimes was battening down objects outside his Westport, Conn., home while juggling a deal for a client when the mandatory evacuation order came: Get out of Hurricane Sandy’s way.

His client, Patheon Inc., hoped to nail down its acquisition before the next work week began, so Grimes, a partner in Reed Smith’s New York office, worked with his team through the night, finalizing at 3:30 a.m. the stock-purchase agreement to buy Banner Pharmacaps Inc. for $255 million.

“You multitask,” he said.

It was like that across the Northeast as Sandy stormed ashore, causing flooding from North Carolina to New England. Courts — except for the U.S. Supreme Court, which heard oral arguments as scheduled on October 29 — law schools and firms closed their doors. In New York City, with public transportation halted, bridges closed and for much of Manhattan the power was out — law offices ran on skeleton crews, their attorneys hunkered down at home or in nearby hotels.

The client work, after all, needed to go on, natural disaster or not.

“Where there’s a will there’s a way,” said Peter Bicks, partner in charge of Orrick Herrington & Sutcliffe’s New York office. Bicks wasn’t sure exactly how many employees were on hand in the immediate aftermath, but said that the lights, power and even the food cart parked on the street outside were fully operational.

Duane Morris partner Richard Silfen also had the will to keep churning out the work. The firm’s Philadelphia office were closed, but he slogged in to lead a team closing an initial public offering for Lehigh Gas Partners L.P.

In some cases, offices provided relief from the storm’s destruction — and the tedium of sitting around at home in the dark. A number of attorneys and staffers at Drinker Biddle & Reath’s office in Florham Park, N.J., by midweek were availing themselves of the showers in its on-site gym. “Most of us don’t have any power, and some of us don’t have water,” said attorney Andrew Joseph.

For the most part, however, the legal sector shut down across a broad swath of the East Coast as Sandy collided with Arctic air, creating a “superstorm” that flooded many communities, blanketed others in snow and by week’s end had left 88 dead. Some experts placed the economic losses at $50 billion.

“It reminded me of the devastation of Hiroshima,” said Queens County, N.Y., District Attorney Richard Brown. He referred to what greeted him on October 31 when he visited the New York shorefront neighborhood of Breezy Point, where more than 100 homes had burned as firefighters waded through storm surge to rescue families.

As of the end of the work week, legal communities in New York City and parts of New Jersey remained closed. Wall Street law firms including Sullivan & Cromwell; Cahill Gordon & Reindel; and Fried, Frank, Harris, Shriver & Jacobson were without working phones. Carter Ledyard & Milburn, at 2 Wall Street, posted on its website that it “was still unable to predict when normal functioning will be restored.” In Newark, N.J., flooding from the Passaic River shut down The Legal Center, a 20-story building that houses the headquarters of Sills Cummis & Gross and offices of Duane Morris, Saul Ewing, LeClairRyan and Patton Boggs, among other firms. The building was closed indefinitely.

The storm tripped up court deadlines as well. The U.S. Department of Justice was staring at a November 2 deadline to file a brief in Hedges v. Obama, a closely watched national security case in the U.S. Court of Appeals for the Second Circuit involving the indefinite suspension of terrorism suspects. On October 31, Civil Division lawyer August Flentje sought a two-day extension. “Many people in the Washington and New York areas have also lost power, making review of the brief from home difficult or impossible,” he wrote in court papers.

Law schools in the battered area closed their doors. Three located in lower Manhattan — New York Law School, New York University School of Law and Yeshiva University Benjamin N. Cardozo School of Law — were shut at least for the remainder of the week. The two law schools in Newark — Seton Hall University School of Law and Rutgers University School of Law–Newark — planned to reopen this week.

Despite the difficulties, it could have been worse. Many law firms had emergency plans, having learned hard lessons from the chaos that followed the Sept. 11, 2001, attacks and Hurricane Katrina.

Equipped with offsite servers, some stashed in bunkers in far-away states, and remote-access technology, hundreds of lawyers and staff enjoyed access to email and client files even though their offices were closed.

Boston-based Goulston & Storrs had conducted a test-run on October 26 to determine whether it was prepared for the storm. “On Friday, we ran through some protocols to make sure that our backup services would be working in the event that any or all of the offices would be closed,” said co-managing partner Doug Husid.

Paul Hastings installed extra servers for its New York office the weekend before Sandy hit. Once the storm arrived, they were bombarded by traffic from attorneys working from home, said office managing partner Barry Brooks. Information-technology employees and other staff worked through the night to make sure it all kept working, he said.

At Duane Morris in Philadelphia, a spokesman said that nearly 250 lawyers worked remotely. And Fish & Richardson put to use its written disaster plan. Director of operations Barbara Mannix said it covered everything from accommodating increased remote computer use to securing physical offices.

But emergency plans at the office didn’t solve the problems for attorneys and staff members at home. Joseph, of Drinker Biddle, along with his wife and four children under age 13, had been without power for four days at last count.

“I’ve been working from the car, working from candlelight,” he said.

Staff reporters Sheri Qualters, Andrew Ramonas, Michael Scarcella and Karen Sloan contributed to this report, as did Sara Randazzo from the AmLaw Daily, Claire Zillman of NLJ affiliate The American Lawyer and Andrew Keshner of the New York Law Journal.