At various grocery and hardware stores, it’s better to be safe than sorry as D.C. residents fill up on winter storm essentials. For some, that means everything from bread and beer to rock salt and firewood. (Jorge Ribas/The Washington Post)

With an epic blizzard virtually certain to pummel the Washington area this weekend, Metro threw up a white flag Thursday, announcing that it will shut down the nation’s second-busiest subway and all bus service Saturday and Sunday in a move that apparently is unprecedented in the transit system’s 40-year history.

The Metro shutdown decision came as Washington and its suburbs braced for what could be a record-breaking blizzard, predicted to start Friday afternoon. The storm is expected to dump as much as two feet of snow on the region, and, combined with strong winds and whiteout conditions, is likely to make travel impossible.

The federal government announced that it will shut down early, states of emergency were declared, the plows and salt trucks were ready to go, and power companies were bringing in outside help. Classes were canceled for area schoolchildren.

Shortly before 11 p.m., the Office of Personnel Management said that federal government agencies in the Washington region would close at noon Friday. Federal workers have the option of taking unscheduled leave or teleworking, but those who do report to their offices must leave no later than noon.

Metro has not taken such drastic action since October 2012, during Hurricane Sandy, when the transit system closed for about 36 hours.

The magnitude of the storm and words being bandied about in advance of it — “whiteout conditions,” “historic blizzard” and “capital in the crosshairs” — spoke to the dire hours that could be ahead.

In his biggest decision since becoming Metro’s top executive two months ago, General Manager Paul J. Wiedefeld said the agency decided to close even underground sections of Metrorail. He said officials worried that high winds during the blizzard will cause a large-scale power outage, which could trap rail passengers in tunnels.

“We definitely understand the importance Metro plays in the entire region,” Wiedefeld said when asked about the region’s residents who depend on public transportation and will not be able to get to their jobs Saturday and Sunday.

“If we get out there and get them stranded, I think that’s the worst option,” he said.

As for whether the shutdown might tempt some people to choose the dangerous option of driving in the massive snowstorm, he said: “Across the board, you’ve seen all the jurisdictions recommend that people not travel. And I think you’ll continue to hear that.”

Suspending rail service also will allow Metro to shelter about 900 of its 1,100-plus rail cars in its idle tunnels. That will “give us a leg up” on resuming subway service Monday morning, Wiedefeld said, because hundreds of rail cars will not have to be shoveled out from snow that might not stop falling until late Sunday.

Bus service will be limited to major road corridors Friday morning and afternoon and will stop running at 5 p.m., Metro said. The subway will begin shutting down at 11 p.m. Friday, four hours early, and will remain closed at least until Monday. Depending on conditions, officials said, it could even stay closed for the start of the work week.

On a crisp but near cloudless day, the fact that two feet of snow could begin falling Friday afternoon, whipped by gale-force winds right through the weekend, seemed almost a dubious prospect, despite all the ominous warnings.

Shoppers braved long lines at a D.C. grocery store Jan. 21, ahead of a winter storm expected dump over two feet of snow on the area. Trader Joe’s in Foggy Bottom said eggs and frozen pizza were the most popular items ahead of the storm. (YouTube)

Many people stayed home Thursday after a salt-shaker dose of snow caused traffic mayhem the previous night. They took to social media with quips and questions about their snow preparations.

One woman asked, “I don’t get the bread thing. Why do we all need 17 loaves of bread when it snows?” Another person joked, “OK, I have the bread, milk and toilet paper. But now I can’t find the recipe.”

Beer, wine and liquor sales soared as a great many people seem to think being snowbound without a handy libation would be an unwelcome dose of purgatory.

The best-guess forecast is that snow will begin between noon and 2 p.m., so it’s reasonable to assume that hardly anyone will go to work Friday unless it’s absolutely necessary.

Airlines already were curtailing flights in and out of the region’s three major airports. When heavy snow hits, they generally fly planes that otherwise would sit overnight at local airports well clear of the area so they can resume service more quickly once the storm passes.

American Airlines, the world’s largest carrier, canceled all Saturday flights from the region’s airports and Philadelphia and said it hoped to resume operation by noon Sunday.

Amtrak said it would implement a modified schedule in the Northeast Corridor, encouraging passengers with reservations to keep a close eye on conditions and check or mobile for the statuses of their trains.

D.C. Mayor Muriel E. Bowser (D), Virginia Gov. Terry McAuliffe (D) and Maryland Gov. Larry Hogan (R) declared states of emergency for Friday in anticipation of the storm.

D.C. Mayor Muriel Bowser updates residents on the city's response plan to the massive snow storm expected to hit the area as early as Friday. (WUSA9)

Bowser said the city’s snow emergency plan — and the parking restrictions that come with it — were in place in advance of the bad weather.

“Don’t take this storm for granted. This is 36 hours of a major storm,” D.C. Police Chief Cathy L. Lanier said.

Branco Vlacich, the Virginia Department of Transportation’s engineer for Northern Virginia, said, “Our crews are preparing for heavy accumulation, limited visibility and severe road conditions.”

Virginia Transportation Secretary Aubrey Layne said, “Driving conditions during the storm are expected to be hazardous, and motorists are urged to stay off the roads until the storm passes.”

McAuliffe encouraged people to “take the threat of this storm seriously.”

If snow hits the totals that forecasters predict, “the recovery is going to last until the early part of next week,” said Taran Hutchinson of the Metropolitan Area Transportation Operations Coordination program.

Maryland’s Gov. Hogan said: “It could be days or even a week to dig out. Be prepared and be patient.”

Hogan said the state had readied 2,700 pieces of snow-removal equipment and had 365,000 tons of salt on hand.

“Make sure you have food and supplies to last not just for the weekend but enough to last up to an entire week,” Hogan said.

The region’s three big power companies said they were preparing to deal with the snow and wind.

“Our trucks are fueled and ready to roll, crews are prepped and ready to engage when the first power outage occurs,” said David Botkins, spokesman for Dominion Virginia Power. “The governor’s state of emergency declaration today will expedite travel on roadways across Virginia for our first responders.”

Botkins said the utility was sending additional crews to the areas expected to be most affected and the company’s three regional storm response centers were being activated.

Pepco said it had more than 550 people ready in the District and Maryland to help deal with power outages.

“Our crews are prepared for this weather event and will work safely and diligently if there are any interruptions in power because of this storm,” Pepco President Donna Cooper said at a news conference where Bowser discussed the city’s snow plan.

Baltimore Gas and Electric said it had called up about 900 support contractors to augment its 3,200 staff workers.

The fear of being housebound without the ability to toast the falling snow sent droves of people to the liquor store Thursday, and they are sure to be followed there by last-minute shoppers before the first flakes fall Friday.

At Circle Wine & Spirits, in the District’s Chevy Chase neighborhood, sales have been brisk for a few days. General manager David Kim said sales Thursday tripled from an average weekday. But, he said, after the storm, “we will be dead” because people buy too much.

“People think about the common goods they need — eggs, milk, beer and wine,” said Ben Jardot, a local wine representative.

“It is not even an afterthought,” he said. “It’s like selling toilet paper.”

Aaron Davis, Dana Hedgpeth, Arelis Hernández, Michael Laris, Luz Lazo, Peter Hermann, Antonio Olivo, Ovetta Wiggins, Patricia Sullivan and Julie Zauzmer contributed to this report.