NEW YORK — Keeping New Yorkers inside their cramped apartments and out of city parks on a sunny Sunday afternoon may prove to be the most herculean task in the age of covid-19.

A deadline was looming: Gov. Andrew M. Cuomo (D) had ordered the closure of all nonessential businesses starting at 8 p.m., and a significant, if reduced, crowd had come out to Washington Square Park in Manhattan’s Greenwich Village to soak up fresh air and freedom as if it were their one-hour daily break in a prison yard.

Cuomo’s order does not force anyone to stay inside — yet. “You want to go for a walk? God bless you. You want to go for a run? God bless you,” Cuomo said in his Sunday news conference.

But he also expressed horror over the density of people — particularly young people — in the city’s parks, treating this like any other weekend, and signaled his intent to crack down on those clustering in groups and disobeying public health officials’ guidance to keep at least six feet apart. “There’s no concept of social distancing in basketball,” the governor said. “You can’t stay six feet away from a person playing basketball.”

Of people who are carrying on life as usual, he said, “It is insensitive, arrogant, self-destructive, disrespectful to other people, and it has to stop, and it has to stop now.”

Cuomo said he’d told the city to come up with a plan in 24 hours that he could approve and suggested opening streets for pedestrians. City Council Speaker Corey Johnson, another proponent of opening the streets, tweeted his support for the governor on Sunday: “I support @NYGovCuomo’s call to reduce density in city parks. We must #StopTheSpread. The @NYCCouncil will do all we can to make this happen.”

Mayor Bill de Blasio (D), in a news conference alongside New York City Police Department Commissioner Dermot Shea on Sunday, said parks could be closed if New Yorkers didn’t comply with rules. “You can go to the park but only for a limited period of time,” de Blasio said. “Go get your exercise. Get home.”

Shea said the NYPD had started making new patrols to encourage people to practice social distancing, and had issued three verbal warnings in 24 hours.

As for playgrounds, he said it was up to parents to decide whether they’d let their kids play there, since it was impossible to keep them sanitary unless the city cleaned them “literally every five minutes.”

Cuomo’s concern is urgent. New York state has the most confirmed cases in the country — nearly half of the U.S. total — but has also been aggressive about testing. In New York City, the state’s epicenter, parks have emerged as a battleground of sorts in authorities’ desperate effort to enforce social-distancing recommendations and, it is hoped, slow the spread of infection.

The executive order is called “New York State on PAUSE,” which stands for “Policy that Assures Uniform Safety for Everyone.” Essential businesses including grocery stores, hospitals, laundromats, even liquor stores may stay open, while all nonessential businesses must close. People are urged to stay inside except for noncontact recreation.

Cuomo also instituted an even stricter “Matilda’s Law,” named after the governor’s mother, designed to protect people over 70 or with underlying medical conditions, with rules such as “wear a mask in the presence of others.”

How any of this will be enforced is, so far, vague. “They haven’t told us anything. I think they’re still figuring that out,” said one police officer, who spoke on the condition of anonymity because he was not authorized to speak with the media.

Other than a situation in which police had been given expired hand sanitizer at first, the officer said he felt well protected and ready to be on the virus front lines. “It is what it is. It’s the job. We’re essential, so we’re here.”

Even if police can break up obvious gatherings such as ­basketball games or barbecues, there’s still the issue that 8.6 million people sometimes go outside at the same time. How do you put a stop to spontaneous crowds in the most populous city in America without putting a stop to free will?

To mark the moment, someone had drawn adjacent circles in sidewalk chalk beneath the park’s famous marble arch. “SOCIAL DISTANCE 6 FT” and “#SD6 FT” read the instructions scrawled nearby. One couple sat in the center of a circle and kissed. Does that count as social distancing?

Rollerblader Bart Walter, 61, swooped around in graceful loops like an ice dancer. He’s one of the few park regulars who’s still coming out. On a normal Sunday, there would be six to 10 times more people there, he said, and he missed the “kinetic energy,” plus fellow regulars such as Colin Huggins, who hauls a grand piano to the park most weekends.

A young woman in a fuchsia dress began tap dancing and singing to songs including Amy Winehouse’s version of “Valerie.”

“Nothing Stops Art,” read a sign she’d attached to a hat for collecting donations.

She was Cami Aldet, a student who’d just arrived in the city from Buenos Aires for what she’d hoped would be five months of soaking up jazz clubs and dance classes — only to find that all of those were closed. This would be her last day in the park for a while (one of her 11 roommates has asthma), but she wanted to spread joy while she could: “I think the art is important and people are really sad,” she said.

“Watching you perform is the best I’ve felt since being trapped in my apartment,” said one young man. “You really made things better.”

On the park’s notorious eastern end, the regulars who sit on tables and benches asking passersby, “You smoke?” were out in force. The signature outdoor chess matches seemed to have ceased, but there was a card game.

Several had been laid off because of the virus. Some said they had moved from their usual parks around the city because they were heeding Cuomo’s warnings. “They told us to go to bigger parks, any park where you can stay six feet away” said a man who was selling bottles of Febreze and refused to give his name. “So this is where everyone comes to chill.”

As darkness fell and the 8 p.m. cutoff came, the park got quieter, but wasn’t close to empty.

Vikktor Ducati III was selling marijuana for $20, which he said was for a hotel that night. He had a message for President Trump: “You need to open up one of them Trump hotels and let the homeless stay in there and bathe with all types of good cleaning. Because that’s what makes America great.”

A lone skateboarder did tricks in the park’s empty fountain. Three kids drank what looked like 40-ounce beers.

A woman who goes by the nickname of Sue and identified herself as homeless pushed around a shopping cart with a bag of aluminum cans attached.

Snow was forecast for Monday, but she was more concerned about staying out of homeless shelters and jail — breeding grounds for the virus — than staying warm.

“I sleep in the streets, outside,” she said. “Sky’s the limit.” She had faith that New York would get through this, like it got through 9/11 and Hurricane Sandy; the city always does. Until then, she said, “I’m going to live every second of every minute of every day like it’s my last.”

Shayna Jacobs contributed to this report.