A former Brooklyn prosecutor who once made headlines for calling hookers from his work number attacked a motorist and tried to frame him for the assault, the driver claims in a lawsuit.

Aaron Ross told The Post that he was parked while waiting to see his rabbi in East Midwood in March 2015, when the car in front of him reversed into his vehicle.

Ross honked his horn, and ex-Assistant District Attorney Mark Posner hopped out of the other car and began “reaching through [Ross’] car windows,’’ Ross says in the Brooklyn Supreme Court suit.

Posner “physically attacked me,” said Ross, 30. “When I reversed out, he ran down the street chasing me. He jumped onto the hood of my car. I stopped, and he didn’t get off.’’

Ross said Posner started screaming, “You have no idea who you’re messing with!”

Posner, the son of late Judge Charles Posner, called the cops, and Ross was charged with assault and menacing.

“I was the victim. I was assaulted, and instead of prosecuting Posner, they prosecuted me,” the Queens man said.

Posner and the arresting officers “misrepresented and falsified evidence to the Kings County district attorney,” his suit says.

The charges against Ross were eventually dropped, and now he wants the city and Posner, who has left the DA’s office and is in private practice, to cough up an unspecified amount for false arrest and malicious prosecution.

In 2013, Posner was caught dialing a call-girl service from his work phone by colleagues who were probing the prostitution enterprise.

The city Law Department declined to comment, and Posner did not return a message.