A woman who was punched by a cop in an off-the-rails Jersey Shore arrest that went viral over the summer was indicted for assaulting two officers involved in the scuffle, court sources told The Post.

Emily Weinman, 20, of Philadelphia — whose violent, caught-on-camera arrest sparked outcry over police use of force — was indicted last Tuesday by a Cape May County grand jury and now faces trial, the sources said.

Weinman was with a friend at Wildwood Beach on Memorial Day weekend when officer Thomas Cannon and his partner, officer Robert Jordan, questioned the underage women about unopened bottles of booze near their beach blankets.

Weinman claimed the alcohol belonged to her aunt and refused to give the cops her name — sparking a wild brawl in which she shoved Cannon and he punched her twice in the head, according to the footage.

But authorities allege that she attacked and spit on the officers. The grand jury indicted Weinman on two counts of aggravated assault on police officers, resisting arrest, throwing bodily fluids, and obstruction, according to court officials.

Her lawyer, Stephen Dicht, fired back, saying the cops involved should be the ones on trial.

“We welcome the chance to vindicate Emily and show that police are the culprit in this case, not her,” he told The Post.

Weinman didn’t spit on the police officers — she was simply trying get sand out of her mouth, he said.

During the arrest footage, Weinman appears to pass a Breathalyzer test but then lashes out at Cannon when he asks for her name.

“You’re mad because you thought we were drinking,” she says, according to video.

“OK, that’s it — I’m done with you,” he says, then asks his partner for handcuffs.

Weinman backs away, shouting, “Don’t touch me!”

She is later shown pushing the cop before he wrestles her to the ground by her ponytail. “You’re choking me!” she screams.

The video quickly sparked outrage among critics who claimed Cannon and Jordan, who were seasonal special officers, were at fault.

Cannon and Jordan were cleared of wrongdoing after authorities reviewed cellphone and police bodycam footage.

In July, Weinman refused a plea deal.