Officers with the New York City Police Department restored the American flag on the City College of New York campus after it was replaced with a Palestinian flag by anti-Israel agitators during a protest.

NYPD Deputy Commissioner Kaz Daughtry applauded the move on X, formerly Twitter, at around 12:39 a.m. Wednesday – not long after officers gained control of the campus.

"An incredible scene and proud moment as we have assisted @CityCollegeNY in restoring order on campus, culminating in raising Old Glory once again on their campus flagpole," Daughtry wrote on X.

It's unclear when the Palestinian flag was raised on the campus' flagpole, but Within Our Lifetime Palestine, a pro-Palestinian account on X, posted a video of it flying in place of the American flag at 8:59 p.m. Tuesday.

ANTI-ISRAEL PROTESTERS SET UP ENCAMPMENT AT NY CITY COLLEGE

American flag being raised after its removal

New York City Police Department officers tore down a Palestinian flag at City College of New York Wednesday morning and replaced it with an American flag after regaining control of campus following anti-Israel protests. (X/@NYPDDaughtry / Screenshot)

In similar fashion to nearby Columbia University, CCNY had been experiencing days of anti-Israel protests on campus as agitators called for the university to divest from Israel and for a cease-fire in Gaza, among other things.

The protests came to a head Tuesday evening when "a large crowd of demonstrators" marched from Columbia to CCNY, according to a statement released early Wednesday morning by the City University of New York (CUNY), the system overseeing CCNY. 

Local news outlets reported that the agitators were firing off flares at the entrance to the CCNY campus.

Anti-Israel protesters at CCNY

Anti-Israel agitators marched from the Columbia University campus to the City City of New York campus Tuesday night, firing off red flares near the CCNY entrance. (Spencer Platt/Getty Images)

CUNY public safety initially responded and arrested 25 participants, CUNY said, but the system ultimately made "the difficult decision" to request backup from the NYPD, which arrived at about 11:45 p.m. and made an undisclosed number of arrests.

Protesters arrested at CCNY

The City College Of New York (CUNY) said it made the "difficult decision" to call in the NYPD for backup once anti-Israel demonstrations at the City College of New York campus got out of hand. (Spencer Platt/Getty Images)

UNIVERSITIES CRACK DOWN ON ANTI-ISRAEL AGITATORS AS PROTESTERS CALL FOR 'AMNESTY'

The statement said "a series of violent incidents" during the anti-Israel protests over the past six days put public safety and the campus community at risk and led to the decision.

"This includes a fire Sunday night at the Marshak Science Building caused by use of a flare gun that brought FDNY to campus, clashes with public safety, an attempted break-in at Shepard Hall tonight, and a break-in at the Administration Building tonight that included the vandalizing of offices and smashing glass doors," the statement said.

CLICK HERE TO GET THE FOX NEWS APP

CUNY made clear that students are allowed to "demonstrate peacefully and exercise their First Amendment rights," but "specific and repeated acts of violence and vandalism" will not be tolerated.

Pro-Palestinian protesters hold signs at CCNY

CUNY said students in its system have the right to protest peacefully and to exercise their First Amendment rights, but said "violence and vandalism" are unacceptable.  (Spencer Platt/Getty Images)

"CUNY will continue working to keep our community free from violence, intimidation and harassment," the statement concluded. 

In an emergency message on Tuesday, City College President Vince Boudreau said all campus operations would be online until further notice beginning Wednesday.