NEW YORK (AP) — A group of New York City restaurants asked a judge this week to block the city’s latest effort to curb the spread of the coronavirus, calling the city’s mandate that customers show proof of vaccination “arbitrary, irrational, unscientific and unlawful.”

The group argued that the new rules would severely harm their businesses and livelihood.

The city’s proof-of-vaccination edict went into effect Tuesday and requires anyone dining indoors at restaurants, going to museums, attending concerts, working out at a gym or entering many indoor public venues show proof that they have been inoculated against COVID-19.

The group of restaurateurs that filed the lawsuit in Richmond County, which encompasses Staten Island, said restaurants and other establishments included in the city’s vaccine mandate were unfairly targeted because many other places such as grocery stores, hair salons, churches, schools and office buildings were excluded from the mandate.

“This vaccine mandate is arbitrary and capricious due to the fact that it targets certain establishments but not others with no rational whatsoever,” the lawsuit states.

Mayor Bill de Blasio first announced the new rules on Aug. 3. He said enforcement won’t begin until Sept. 13 in order to give businesses more time to prepare and to give people an opportunity to get vaccinated before they would become excluded from partaking in many aspects of public life.

The delta variant has caused infections and hospitalizations to surge in recent weeks, as public health officials across the country urge the unvaccinated to get a shot in the arm to help control the virus.

But some have resisted getting vaccinated, saying they are uncertain about its efficacy and safety despite assurances by public health officials that the vaccines are safe and effective. Others dislike government mandates. The city’s latest data shows more than 5.2 million of its 8.8 million residents have gotten at least one shot of a vaccine.

During his virtual news conference Thursday, de Blasio said it would take time for restaurants and other establishments to “get used to it or to figure out” how to put the new rules in place. He said he was open to issuing a “a specific template out there for folks to use if that’s helpful to them, but I think a lot of business owners are going to have their own approach.”

The day before, de Blasio said he had “tremendous confidence that we’re in a very strong legal position,” regarding the new rules.

The mayor said the global pandemic, particularly because of the fast-spreading delta variant, has prompted the city to take more urgent and aggressive measures.

“We know we must get more people vaccinated and strategically focusing on the ways to get more people vaccinated,” he said, adding that he was “absolutely certain” that the vaccine mandate “is a way we will achieve those goals, do it in a smart way, a fair way – based on the data and the science.”

The industry group, NYC Hospitality Alliance, has said it supported the city’s new measures to prevent harsher restrictions that could cause many restaurants and bars to go out of business permanently.

Still, the restaurant group that filed the lawsuit, asserted the new rules go too far and said it carved out few exceptions, particularly for those who cannot or should not get a vaccine.