“A civilized society must not allow an assault to be committed under the guise of civil disobedience,” Judge Ronald Zweibel said in front of a packed gallery before sentencing the New School graduate to the jail term and up to five years’ probation.

​More than​ 100 supporters came to court in solidarity with McMillan and sat quietly as the sentence was handed down. As they left the courtroom, several softly sang “We Shall Not Be Moved” and chanted “Cecily is innocent.”

Manhattan Assistant District Attorney Shanda Strain urged Zweibel to impose a prison term and blasted McMillan for her lack of remorse and insincere grandstanding.

“She seeks to be perceived as a martyr and to gain fame from her involvement in this case,” said Strain. “That’s not what our court system is for.”

McMillan, wearing a frilly pink suit, insisted to the judge that she was innocent. “I cannot confess to a crime I did not commit,” she read from a statement. “I lost friends and family, school and work and most recently my freedom.

“I’ve been exhausted of most everything that makes me, with one exception — my dignity.”

Cecily McMillan (center, in bright yellow/green) during her arrest at Zuccotti Park.Reuters

McMillan was in Zuccotti Park on the ​six-month anniversary of Occupy Wall Street on March 17 ​, 2012, to visit a pal for St​.​ Patrick’s Day​,​ and not as a protest​er, she said at trial.

She testified during the four-week trial that she elbowed ​Police ​Officer Grantley Bovell in the eye after he grabbed her right breast.

But prosecutors said McMillan had refused to leave the park and was angrily yelling at cops. They claimed McMillan shouted to a bystander, “Are you filming this? Are you filming this?” before she attacked the cop and tried to run.

A damning video played at trial showed Bovell escorting McMillan out of the park when she suddenly crouches down and jumps up, clocking him in the eye.

McMillan testified that she had no recollection after that moment and claimed she suffered a seizure after being thrown to the ground during her arrest.

The jury also saw pictures of bruising to her right breast and face.

Prosecutors claim she fabricated the breast-grab defense two years after the incident.

McMillan faced a maximum of seven years in prison.

Her attorney​,​ Martin Stolar​,​ said they were disappointed by the sentence and would appeal the conviction.

Stolar submitted dozens of letters to the judge asking for leniency, including from the president of the New School, indie film producer Spike Jonze and two Pussy Riot members who visited her at Riker’s Island.