D.C. and Baltimore expanded mask requirements Wednesday in an attempt to stave off the growing spread of the novel coronavirus in the region.

D.C. Mayor Muriel E. Bowser said her order requires people older than 2 to wear a mask when they leave the house and are likely to come into contact with others. It’s one of the strictest mask ordinances in the country — and came on the same day the city recorded 102 new coronavirus cases, the highest daily number since early June.

“You don’t know if you’re going to be able to maintain social distance,” said Bowser (D).

John Falcicchio, the mayor’s chief of staff, said D.C. police will be empowered to fine people not wearing a mask, although the city expects such fines to be limited.

As the city’s case counts rise, Health Director LaQuandra Nesbitt said Wednesday that an increasing proportion of those newly diagnosed infections involve younger people.

Since July 1, 66 percent of cases are people under 40, compared with 41 percent before July. The percentage of hospitalized patients who are under 40 has risen from 16 percent to 29 percent. Nesbitt said the cases include an increasing proportion of children under 14.

In interviews with people who have tested positive, she said, “we’ve observed some behaviors we don’t believe are essential. Some people are traveling to hot spots,” noting that group family vacations also have been a factor.

Before publishing her order Wednesday, Bowser said it would require people to wear masks at almost all times outdoors, except during “vigorous exercise.” Even walking a dog alone or waiting for a bus would require a mask, she said.

But the text of the order appeared less stringent: “Persons leaving their residences shall wear a mask when they are likely to come into contact with another person, such as being within six feet of another person for more than a fleeting time.”

Several D.C. Council members praised the mask mandate during a call Wednesday while questioning how it would be enforced. There also were questions about whether the city should do more to combat the rising spread of the virus, such as prohibiting indoor restaurant dining or requiring people who visited certain areas to quarantine.

Nesbitt said D.C. residents vacationing in Texas and Florida and at Atlantic Ocean beaches were a major source of the virus in the city, but she did not raise the possibility of travel-related quarantines.

The 102 cases reported Wednesday represent the city’s highest daily total since 104 cases were announced June 4. The ­seven-day average caseload bottomed out in the low 30s but has more than doubled in recent weeks.

D.C. health officials have cited a stubborn rate of community transmission of the virus, with a high prevalence of cases seemingly unconnected to one another, rather than traceable to one cluster of infections.

In addition to the mask requirement, the city is stepping up enforcement at establishments with liquor licenses, which are allowed to serve alcohol only at tables six feet apart. Four have been fined, and city inspectors will be authorized to issue fines on the spot going forward, Bowser said.

In Baltimore, Mayor Bernard C. “Jack” Young (D) signed an executive order Wednesday suspending indoor dining at bars and restaurants beginning at 5 p.m. Friday. The city’s health commissioner is also mandating that people wear masks when they are outdoors and when social distancing of six feet is not possible.

Baltimore is the first jurisdiction in Maryland to restrict activities that were permitted under its reopening plan. The order reverts activity back to outdoor dining and carryout services only.

“These decisions were not easy, nor were they made to punish a particular industry,” Health Commissioner Letitia Dzirasa said. “These decisions are rooted in current data and trends we’re seeing in covid-19 cases in Baltimore City.”

Dzirasa said the city’s cases are climbing at a higher rate than it expected with increased testing.

In the past month, Baltimore’s cases have doubled from an average of 63 a day on July 4, which was two weeks after reopening, to an average of 134. The highest incidence and positivity rates are among people ages 20 to 40.

The region’s increasing caseloads prompted New York Gov. Andrew M. Cuomo (D) this week to add Maryland and Virginia to his state’s travel advisory, which requires visitors to quarantine for 14 days to stem the spread of the coronavirus.

“As infection rates increase in 41 other states, our numbers continue to steadily decline, thanks to the hard work of New Yorkers and our incremental, data-driven opening,” Cuomo said in a statement.

Maryland and Virginia were two of 10 states added to New York’s list of states that have “significant community spread.” The list also includes Florida, Georgia and other hot spots.

Maryland Gov. Larry Hogan (R) said Wednesday that New York “made a mistake” in putting Maryland on its list, adding that he thinks Cuomo considered only the state’s increased caseload, not deaths, hospitalizations and rate of infection, which are “trending pretty well.”

The travel advisory comes as several local health officials in Maryland, concerned about the rate of infection in their jurisdictions, have asked the state to reconsider its reopening strategy. Hogan reiterated Wednesday that statewide actions are not warranted, adding that metrics remain “steady.”

He emphasized that the state’s recovery plan provides “flexibility” for local leaders to take steps based on what is happening in their jurisdictions.

In a letter on Wednesday, nursing home industry leaders urged Hogan to continue funding for testing, saying they were told by the state Health Department that they would be expected to conduct testing on their own after Aug. 1.

Hogan in April ordered that all residents and staff at Maryland’s nursing homes be tested for the coronavirus. The state Health Department finished conducting testing in early June and has continued to test staff members weekly.

If nursing homes were to pay for the tests themselves, it would cost between $15,000 and $75,000 per week, depending on the size of the center, wrote Joseph DeMattos, president of the Health Facilities Association of Maryland; Kevin Heffner, president of LifeSpan Network; and Allison Ciborowski, president of LeadingAge Maryland.

“This becomes an unsustainable cost and will put at risk the quality care provided to Marylanders most in need,” they wrote.

Hogan spokesman Mike Ricci said health officials are reviewing the letter.

In addition to funding, they said they also want the state to continue to allow nursing homes to utilize state labs because of their more timely results. With upticks in cases in communities across the state, outbreaks in nursing homes are bound to rise again, they wrote.

Costi Sifri, director of hospital epidemiology at UVA Health in Charlottesville, said a large concern for the region continues to be caseloads in Virginia’s Hampton Roads area, where officials say some young people are going to bars and restaurants without wearing masks.

“Even a modest breakdown in social distancing norms can lead to transmission,” he said.

The growth in caseloads in the Virginia Beach area has stalled in recent days, with a seven-day average that is mostly unchanged since the weekend. Northern Virginia’s case numbers have held steady since mid-June.

Jesse Goodman, a professor of medicine and an infectious-disease specialist at Georgetown University Medical Center, said health experts and the public shouldn’t set high expectations on contact tracing significantly slowing the virus’s spread. He said the public’s behavior will be a larger factor in controlling it.

“We can’t let up on wearing face coverings and social distancing,” Goodman said.

The District, Maryland and Virginia added 1,751 coronavirus ­cases on Wednesday and six fatalities.

Maryland reported 627 new cases, while Virginia added 1,022 cases. The states each had three additional fatalities, while the District had no new deaths.