Gov. Andrew Cuomo did away with New York's near total ban on gatherings Friday, the same day he faced a legal challenge from the New York Civil Liberties Union over exceptions made to the rule.

The new executive order now allows gatherings of up to 10 people, if they practice social distancing and follow "cleaning and disinfection protocols required by the Department of Health." A previous order prohibited nonessential gatherings of any size.

New York state, which has recorded more than 23,100 COVID-19 deaths, issued a ban on nonessential gatherings back in March as the state's coronavirus crisis dramatically escalated. Cuomo relaxed those rules in an executive order this week, allowing for gatherings of up to 10 people for religious services and Memorial Day ceremonies.

That move sparked a legal challenge from NYCLU, which argued the exceptions violated the First Amendment. It was filed Friday in the federal Southern District of New York.

The lawsuit was on the behalf of Brooklyn resident Linda Bouferguen, who was arrested twice while protesting the shutdown of economic activity. She plans to take part in a small demonstration Saturday too, according to the lawsuit.

Christopher Dunn, legal director at NYCLU, issued a statement saying he was glad to see Cuomo "reverse course on his executive order," adding that the right to exercise free speech and protest is the foundation of other liberties.

"During a crisis is exactly when we need to be most vigilant about protecting it," he said in the statement. "Health experts, elected officials, and police officers all agree that people can be outside safely while practicing social distancing, and it's critical that lawmakers create guidelines and direct law enforcement uniformly."

Late Wednesday, NYCLU communicated its concerns about the exceptions to the anti-gathering rule to a senior member of Cuomo's office, according to the lawsuit. The next day, Cuomo signed the executive order allowing the exceptions.

"The NYCLU urged the office to amend the ban on gatherings to allow all First Amendment events of 10 or fewer people observing social distancing," according to the lawsuit.

When asked Saturday if he felt pressure to change the state's anti-gathering rule due to the NYCLU lawsuit, Cuomo responded that he "didn't even know about a lawsuit on this one."

As New York moves through a phased-in economic reopening plan, Cuomo said that permitting gatherings of up to 10 people theoretically should not affect the state's infection rate or its ability to reopen businesses.

"It depends on how people act. You [can] have a safe gathering of 10 people. You can also have a wholly unsafe gathering of 10 people. You can have an unsafe gathering of three people," Cuomo said.

The third-term governor cautioned that people need to weigh gatherings with the risk of infection.

"If you don't have to be with a group of 10 people, don't be with a group of 10 people," he said, arguing the executive order should not be seen as an open season for parties.