Six police officers in Detroit are being accused of acting like they were straight out of “Super Bad.”

Cops who thought three teens were interfering with a prostitution sting posted a picture of one of the handcuffed boys online, drove them in unmarked cars at “reckless speeds” on residential streets and dumped them off in an unsafe area before ordering them to walk home, a lawsuit claims.

The suit, filed on Nov. 18 in federal court in Detroit, alleges a “blatant abuse of authority” on behalf of the officers on Aug. 26, when Hassan Abdallah and Ibrahim Bazzi, both 17, picked up their friend Ali Chami, 18, after his shift at the Coney Island restaurant in Detroit. As the three were about to leave, Hassan spotted a relative pull into a nearby CVS and waved to the man, who drove over and greeted the teens.

But cops thought the teens were discouraging the man from talking to an undercover prostitution “decoy,” according to the suit alleging a slew of bad behavior and police hijinks that got out of hand. The suit seeks unspecified damages.

“These teens did absolutely nothing wrong,” attorney Nick Hadous told The Post. “These cops accused them of interfering with a prostitution sting and the obvious issue is, there’s no crime here. It’s not even a close call. You don’t have an underlying crime or the beginnings of an underlying crime.”

The officers allegedly handcuffed the teens and searched them without consent. The cops then put the teens in unmarked cars and drove them at high speeds without emergency sirens before dropping them off at an intersection in west Detroit instead of taking them to a police station where their parents could safely pick them up, the suit claims.

One of the officers also allegedly took a picture of Ibrahim with his phone and posted it to Snapchat, according to Hadous.

“These officers acted extremely unprofessional and maybe even beyond that,” Hadous told The Post. “They wanted to extract some type of payback or revenge on these kids for interfering with their arrest quota or whatever else they had going on.”

Abdallah’s parked car was also seized and one of the officers drove it to a location in west Detroit, where towing vendors apparently used by city cops in similar “towing scams” were already waiting, according to the suit. The officers then laughed and joked about the arrest before ordering the teens to “walk home” from Tireman and Abington avenues in Detroit despite knowing that they lived in the neighboring city of Dearborn — a distance of about 5 miles.

“The boys complied,” according to the lawsuit, which claims Abdallah was told he would have to pay “thousands of dollars” to get his car back. The teen’s father later paid several hundred dollars to get the vehicle back.

The complaint also claims that the engine on Abdallah’s car “gave out” a few days after he got it back. He ultimately had to sell it to a repairman for a fraction of its market value, the suit claims.

Charges against the teens subsequently were dropped. Hadous said the “unnerving and traumatic” experience has the teens wary of another encounter with police.

“It’s traumatic when you’re handled that way, especially by a governmental body in charge of protecting you,” Hadous told The Post. “We want justice and we want to shed light on what happened. This should not happen to anybody’s children.”

A spokesman for the Detroit Police Department declined comment Monday, citing agency policy. The lawsuit identifies four of the officers: Michael Carson, Joseph Machon, Jordan Leavy and Ibrahim Abdul-Hamid. The full names of two additional officers are not listed.

DPD spokesman Michael Woody told the Detroit Free Press that the four officers named in the lawsuit are still employed by the department.