Imposing a stricter measure to control the spread of the coronavirus, Gov. Andrew Cuomo said on Wednesday that he would start requiring people in New York to wear masks or face coverings in public whenever social distancing was not possible.

The order will take effect on Friday and will apply to people who are unable to keep 6 feet away from others in public settings, such as on a bus or subway, on a crowded sidewalk or inside a grocery store.

“Stopping the spread is everything,” Cuomo said during his daily briefing in Albany. “How can you not wear a mask when you’re going to come close to a person?”

The new requirements are bound to make face coverings an inescapable and perhaps jarring sight in New York City for the foreseeable future. They could also introduce a level of mutual obligation and civic duty about wearing masks in public that is more firmly established in Asia than in the West.

Maryland also announced on Wednesday that it would require people to wear masks in public.

Cuomo said local governments would enforce the order, but he noted that riders without face coverings would not be ejected from public transit. The pandemic has devastated New York’s public transit system, with 59 workers having died of the virus and 2,269 testing positive for the infection.

The state would consider issuing civil penalties to people who fail to abide by the order, but not criminal penalties: “You’re not going to go to jail for not wearing a mask,” Cuomo said.

Permitted face coverings include proper masks, as well as scarves or bandannas, the governor said.

A similar rule was issued in New Jersey last week. The order, issued by Gov. Philip Murphy, made it mandatory for all people inside stores and other essential businesses to wear face coverings unless they are under 2 years old or have a medical condition that prevents them from wearing a mask.

Signs have popped up at stores throughout New Jersey warning customers that they will not be allowed in unless they cover their faces. Some stores have taken a stronger stance, asking people without coverings to leave.

“These restrictions that I have laid out must be followed throughout the state,” Murphy said last week. “We are taking the step to protect both customers and essential workers.”

The mandates were the latest public safety measures from two states that are at the epicenter of the pandemic in the United States. New York and New Jersey have worked in tandem since the outbreak reached the region, shuttering nonessential businesses at the same time and recently forming a coalition with neighboring states to coordinate the reopening of their economies.

In announcing Maryland’s order on masks in public settings, Gov. Larry Hogan said, “The wearing of masks is something we may have to become more accustomed to in order to safely reopen our state.”

New York, New Jersey and Maryland are so far the only states to have issued broad orders mandating face coverings in most public settings, according to the most recent information from the National Governors Association. Puerto Rico and Guam have implemented similar measures.

Nonbinding guidelines from the Centers for Disease Control and Prevention encourage people to wear face coverings in settings where social distancing measures are difficult to maintain to prevent the transmission of the virus. The infection spreads primarily through droplets generated when, for instance, a sick person coughs or sneezes.

That federal recommendation was issued after research showed that many people were infected with the virus but did not show symptoms.

Across New Jersey, businesses were still grappling with the enforcement of the new rules, which some people have flouted, leading to arrests in some instances.

Supermarkets have posted signs on their doors telling customers they cannot come in without a mask, but some shoppers have refused to wear coverings and laughed off the requirement, said Matt Fattah, the owner of a C-Town supermarket in Jersey City.

“A lot of people think they don’t have to follow the rules,” Fattah said. “My employees are all on board, wear masks and gloves 100% of the time. Customers, first few days, it was an issue. Like the bag ban, a lot of customers thought it was a joke, that we were joking.”

Earlier this week, the owners of a toy store in Lakewood, a town near the Jersey Shore, were charged with violating the order after police spotted about 10 people crowded inside the shop. Only three of them were wearing masks, according to police.

And in Pleasantville, a town just west of Atlantic City, a 35-year-old man was arrested on several charges, including violating emergency orders, after he came into a Dunkin’ without a mask and refused to leave after employees asked him to.

Col. Patrick Callahan, superintendent of the New Jersey State Police, said that police would continue to cite and arrest those who ignored orders mandating social distancing and the wearing of masks.

“Because lives are at stake, enforcement action will be taken without hesitation against those who are blatantly placing the lives of others at risk,” he said in a statement.

Murphy, the New Jersey governor, said it was up to businesses to set their own policies on how to deal with customers who do not wear a face covering.

The state order does allow people who refuse to wear a mask for medical or other reasons to enter a store and spend a limited amount of time shopping for essential goods, Parimal Garg, the state’s deputy chief counsel, explained during Murphy’s briefing on April 8.

“I think that’s benevolent,” Murphy responded. “I’d prefer to even be tougher than that.”

K.C. Rondello, a disaster epidemiologist at the College of Nursing and Public Health at Adelphi University in New York, said the mask requirement would ensure compliance from those who would otherwise ignore voluntary guidelines.

“If ultimately these laws lead to greater compliance with social distancing recommendations, then they will have a very real and quantifiable effect on morbidity and mortality,” he said. “It may be difficult for people to understand or appreciate the value of a face covering. They may think, ‘What could a bandanna possibly do?’ But it can make an enormous difference.”

In New York, Cuomo said the new measures were necessary as the state continued to rein in the spread of the virus: On Tuesday, the three-day average of the number of virus patients in hospitals — considered one of the most reliable measures of the virus’ impact — fell for the first time since the outbreak began.

“All people in public must have a mask or nose covering, mouth and nose covering, and they must wear it in a situation where you cannot or are not maintaining social distancing,” Cuomo said.

The governor said a mask was not necessary if, for example, a person was walking down an empty street. But, he said, “You’re now at an intersection and there are people at the intersection and you’re going to be in proximity to other people? Put the mask on.”

He added, “You don’t have a right to infect me.”


Get Boston.com’s e-mail alerts:

Sign up and receive coronavirus news and breaking updates, from our newsroom to your inbox.