“I have been exhausted of almost everything that makes me me, with one key exception: my dignity,” said the 25-year-old graduate student, jailed since the May 5 verdict in a case that she said showed “the personal is inseparable from the political.”

McMillan apologized for injuring the officer, but defiantly proclaimed her innocence.

“I can say with certainly that I am innocent of the crime I was convicted of,” she told Justice Ronald Zweibel in Manhattan Supreme Court. “I cannot confess to a crime I did not commit — in hopes that you will return to me my freedom.”

Prosecutors said McMillan hit an officer in the face, misrepresented what happened and used her trial as “a grandstand for her political opinions,” as Manhattan Assistant District Attorney Shanda Strain put it.

During her trial, McMillan told the jury she had been out drinking green beer for St. Patrick’s Day on March 17, 2012, and she doesn’t remember much of what happened that day.

But she claimed she went to Zuccotti Park to meet a friend, not to join the protest marking the six months since Occupy Wall Street began.

At some point, she got into an encounter with a police officer. A video shows her throwing an elbow in his eye. McMillan said she felt somebody trying to grab her breast from behind, and she reacted instinctively. She said police then roughed her up while arresting her as she suffered what she believed was a seizure.

The prosecutor called her story so unbelievable “that she might as well have said that aliens came down that night and assaulted her.”

McMillan’s case became a rallying point for Occupiers, and members of the once-jailed Russian punk group Pussy Riot have visited her behind bars. Director Spike Jonze, Sonic Youth bassist Kim Gordon, some City Council members and even several of the jurors who convicted her wrote to the court asking for leniency. More than 171,000 people have signed an online petition.

For all that, “a civil society must not allow an assault to be committed under the guise of civil disobedience,” Manhattan state Supreme Court Justice Ronald Zweibel said. “Ms. McMillan must take responsibility for her conduct.”

McMillan’s supporters overflowed the courtroom Monday, singing “We Shall Not Be Moved,” a folk song recorded by Pete Seeger and long a protest staple, as they filed out afterward. More than 30 court officers lined the courtroom as well, an unusual show of crowd control that came after some spectators shouted “Shame!” when she was convicted.