Gov. Andrew Cuomo issued a statewide executive order Friday night that now allows any gathering of up to 10 people, so long as social distancing is observed.

The surprise order permits “any non-essential gathering of ten or fewer individuals, for any lawful purpose or reason, provided that social distancing protocols and cleaning and disinfection protocols required by the Department of Health are adhered to.”

The law appears to now legalize such small gatherings as indoor house parties or outdoor barbecues, picnics and even mini-protests, so long as no more than ten people are sharing in the activity — and they all stay six feet apart while doing so.

Friday night’s order was a nearly immediate response to the New York Civil Liberties Union, which filed a lawsuit earlier Friday challenging Cuomo’s prior ban.

That ban had barred all non-essential gatherings but made exceptions for houses of worship and Memorial Day gatherings, which would be allowed to gather in groups of ten or fewer.

“This shocking order, forced by a lawsuit, changes nothing about the risks associated with group gatherings — especially those held indoors,” Mark D. Levine, who chairs the City Council’s health committee, tweeted in protest Friday night.

“We need the public to continue to be smart and use judgement about the risks of this virus, regardless of what the court has forced on us.”

The NYCLU’s Manhattan federal lawsuit was filed on behalf of Linda Bouferguen, a city resident who the suit says was twice arrested while trying to hold small, socially-distanced rallies outside City Hall.

The suit argued that the “gathering” limit should not apply unevenly to state residents — if houses of worship and Memorial Day celebrants could gather, so too should people who engage in “protest activity.”

Within hours, the state Attorney General’s office reached out to the NYCLU to say the state would comply with their demands voluntarily, said the group’s executive director, Donna Lieberman.

“The governor is a lawyer,” Lieberman said.

“He knows about the First Amendment and the people around him know that the cardinal principal … is you can’t disadvantage one type of speech over another,” she said.

“Here we have an executive order that gave special rights, in the midst of this public health crisis, to people who were saluting the military or engaging in religious activity,” she said.

“You can’t favor that activity but not allow other protest activity that involves less than 10 people and complies with social distancing.”

The mayor’s office did not immediately respond to a request for comment. A governor’s spokesman, Richard Azzopardi, said only, “Please be safe and wear a mask.”

Additional reporting by Bernadette Hogan