A vicious strain of the flu is battering the Washington region, mirroring a wave of debilitating illness that in recent weeks has seized the entire United States, health officials say.

With the number of cases across the country still rising, health officials in the District, Maryland and Virginia are reporting a surge in patients showing up at doctor's offices and emergency rooms suffering from fever, severe headaches, muscle aches and nausea.

The spike is touching all age groups, although young children and the elderly appear to be most vulnerable, and many hospitals and nursing homes have restricted visitation.

In the District, health officials counted 382 new influenza cases during the first two weeks of January — more than half of the 624 reported in the city since flu season began in October.

"Looking at this season and the past five seasons, this is the worst one we've seen," said Preetha Iyengar, supervisory epidemiologist at the District's Department of Health.

The increase in the District reflects what health officials are reporting from coast to coast, including California, where some hospitals are setting up tents to triage the overflow of patients. In the second week of January, more people were treated for flulike symptoms than at any equivalent time in nearly a decade, according to the Centers for Disease Control and Prevention.

Since the start of flu season, nearly 9,000 people have been hospitalized nationwide, the CDC reported. A total of 30 children have died, including 10 during the week that ended Jan. 13. "There's a lot of flu out there right now — that's the simple way to put it," said Kristen Nordlund, a CDC spokeswoman.

In Montgomery County, where nine public schools have reported upticks in absences due to illness, officials Tuesday issued a warning about widespread cases of the flu and urged precautions and vaccinations.

The county's six hospitals on Tuesday announced that they would bar from their facilities all children under the age of 12 and visitors experiencing symptoms that include fever, cough, sore throat, runny nose and muscle aches. Visitors exhibiting flu symptoms who go to a hospital to visit a patient will be asked to wear masks.

"You worry about bringing disease into the hospital," said Travis Gayles, the county's health officer. "It's not uncommon in these situations that health facilities will implement stronger and stricter restrictions."

The number of flu cases in Montgomery was not immediately available, Gayles said. But "anecdotally, it looks like this is much worse than in the past several years," he said.

Across Maryland, a total of 208 people tested positive for the flu during the second week of January — the highest week of flu activity this season — according to the state's Department of Health.

In some cases, the outbreak appears to have put a strain on supplies of flu vaccines. A pharmacist at a CVS in Bethesda said her branch ran out of flu shots in December, after having given a total of 1,000 shots since August. The pharmacist, who spoke on the condition of anonymity because she was not authorized to talk to a reporter, has sought additional vaccines but has been unsuccessful.

"A lot of places have run out," said the pharmacist, referring to grocery stores as well as pharmacies. "And now that flu season is in full swing, unfortunately I don't even know where to send people other than their doctor's office."

In Fairfax County, a quarter of all patients visiting emergency rooms in recent days have suffered from flulike symptoms, said Benjamin Schwartz, the county's director of epidemiology and population health.

Two long-term care facilities for seniors experienced outbreaks of the flu this season in Fairfax, prompting health officials to request that people experiencing flulike symptoms not visit nursing homes or assisted-living facilities.

"Every flu season is different, but this season is tracking pretty similarly with a couple of recent seasons that have been bad," Schwartz said.

Across Virginia, there were close to 160 confirmed flu cases during the second week of January, the highest number of cases this season, according to the Virginia Department of Health. School officials in Fairfax and Loudoun counties said they have not received reports of increased absences of students or staff.

The Eastern Mennonite School in Harrisonburg, Va., a town two hours southwest of the District, closed for two days last week because so many students were out sick with the flu. School staff spent the time sterilizing handrails, chairs, tabletops and other surfaces.

Paul Leaman, the head of the school, said that in his 31 years as an educator, he has never seen so severe an outbreak.

"It seemed extraordinarily contagious," he said.

In the District, Mai Abdo, 50, said she was bedridden for five days even though she had gotten her flu shot before her diagnosis and taken Tamiflu afterward. Her symptoms included a 102-degree fever, a sore throat and a severe headache that lasted four days despite regular doses of Advil.

"I felt the worst I've ever felt in my entire life," she said.

Her husband, Jim Abdo, a prominent developer, ordered her quarantined to their bedroom to keep him and their two teenage children from getting sick. At one point, he fled to Florida to play golf with his son only to find himself come down with a severe cold.

"Having the flu is like heartbreak," Mai Abdo said, laughing. "No one loves you. No one wants to be around you. You're shunned."

As of Monday, she was feeling better. And so was Mr. Abdo.

Lena Sun contributed to this report.