Two city councilmen were among nearly 20 people arrested Thursday morning in Lower Manhattan while protesting the detention of an immigrant-rights activist who’s battling deportation, a council staffer said.

Council members Jumaane Williams (D-Brooklyn) and Ydanis Rodriguez (D-Manhattan) were busted while blocking an ambulance holding Ravi Ragbir on Broadway near City Hall, said Sebastian Maguire, an aide to Councilman Daniel Dromm (D-Queens).

Williams breathlessly said, “Freedom. Resist. Freedom. Resist. We are going to resist,” while a cop held him face down on the hood of a gray car, according to video posted on Twitter by BuzzFeed News.

The 39-second clip also shows cops grappling with several protesters sitting on the street.

A photo posted on Rodriguez’ Twitter account shows him being restrained by at least two cops, one of whom has both arms wrapped around the back of pol’s head and neck.

“This is NOT how you treat people who are protesting for Human Rights. This is NOT what democracy looks like. We can’t call ourselves progressives and pro-immigrants when the @NYPDnews is doing chokehold to us. Injusticia!” the caption says.

A female protester also claimed she was roughed up by cops.

“They were picking me up and throwing me because I’m small enough that they could,” freelance journalist Indigo Olivier, 22, of Brooklyn, told The Post.

“They kept going for my breasts. They were really aggressively pushing and I kept saying, ‘Those are my breasts.’”

Around 300 people took part in the protest.

The NYPD said 10 men and eight women were taken into custody, but didn’t immediately respond to a request for comment on the claims regarding its officers’ conduct.

Mayor de Blasio has “been briefed on the protest and police activity along Broadway in Lower Manhattan,” a spokesman said on Twitter.

“The area is covered extensively by cameras and we’ll be reviewing the footage to get to the bottom of what happened,” spokesman Eric Phillips added.

Officials will scrutinize the actions of both cops and protesters, City Hall sources said.

An NYPD union leader called on de Blasio ” to start an investigation on these council members that actively went in front of an ambulance with its emergency lights on taking a patient to the hospital.”

“They have a right to protest. It’s the American way, I get it,” said Lou Turco, president of the Lieutenants Benevolent Association.

“But they cannot block an ambulance going to the hospital. And these are council members who are dictating policy for the city of New York.”

Ragbir, executive director of the New Sanctuary Coalition of New York City, was detained by Immigration and Customs Enforcement officials during a “routine check-in” at 26 Federal Plaza, according to a statement issued by the group.

He was put in the ambulance after fainting, Maguire said.

All those arrested were taken to the 7th Precinct headquarters, where the Rev. Raymond Blanchette emerged and told fellow activists that Williams was going to be released with a desk appearance ticket.

But Rodriguez is being booked on charges of disorderly conduct, resisting arrest and obstruction of government administration, and will be held pending arraignment, Blanchette said.

An immigrant from Trinidad, Ragbir was ordered deported in 2006 following his conviction for wire fraud and conspiracy, but has remained in the US by challenging that ruling.

Lawyers with the Immigrant Rights Clinic of Washington Square Legal Services filed a suit on his behalf Thursday against US Attorney Jeff Sessions and other government officials, claiming Ragbir has a “stay of removal” that’s valid through Jan. 19.

“A longtime New Yorker, a husband and a father, Ravi is beloved by all of us who have had the privilege of working with him to make New York a welcoming community for all of its residents,” said the Rev. Kaji Dousa, co chair of the New Sanctuary Coalition.

“The fact that ICE has taken him as if his spirit, family ties, and contributions to the community mean nothing is inhumane.”

ICE didn’t immediately respond to a request for comment.