An embattled veteran NYPD detective who has been named in more than a dozen lawsuits was vindicated this week in one case in which he was accused of beating up a teen.

A Manhattan federal judge on Thursday granted a motion to dismiss the civil rights suit against Det. David Terrell and the city of New York filed by Anthony Floyd in connection to the alleged 2014 incident.

“The claims against Det. Terrell are dismissed for failure to establish ‘personal involvement of defendants [which] in alleged constitutional deprivations is a prerequisite to an award of damages…’” wrote Judge Loretta Preska in the 22-page ruling.

Terrell and other cops from The Bronx’s 42nd Precinct were accused of falsely arresting and detaining Floyd on April 5, 2014 and Terrell was alleged to have bashed Floyd in the head and face, giving him a fractured eye socket and broken nose, according to court documents.

“Det. Terrell repeatedly asked Plaintiff if he knew who was dealing guns in the neighborhood and when plaintiff protested that he didn’t know anything about guns, Det. Terrell told him ‘shut up or I will break your face,’” the documents say.

Preska wrote that the documents provided by Floyd to support his claims “demonstrate a complete lack of personal involvement by Det. Terrell in the alleged incident on April 5, 2014 and instead demonstrate the involvement of a different police officer.”

“The command log specifically states that Plaintiff was arrested on April 4, 2014…by ‘PO Rojas’ and not on April 5, 2014, by Det. Terrell as alleged,” Preska wrote.

The ruling also states: “Finally, Det. Terrell’s memobook entry for both April 4, 2014 and April 5, 2014, makes no mention of Plaintiff.”

Preska, in the ruling, called that the allegations against Terrell “bare assertions.”

“[A]ll claims against Det. Terrell are dismissed for failure to plead sufficient facts, including personal involvement, and for failure to state a claim that is plausible on its face,” the ruling reads.

A lawyer for Floyd could not be immediately reached for comment.

City Law Department spokeswoman Kimberly Joyce said in a statement: “We are pleased with the Court’s decision. Detective Terrell had no involvement in this alleged incident, and the Court correctly dismissed him from the lawsuit.”

Terrell, who has been hit with a slew of Civilian Complaint Review Board complaints, is named involved in several pending cases against him.

One of them involves allegations that Terrell propositioned a Bronx mom, Elizabeth Rosado, “whenever any of her sons, Angelo Cotto or Antonio Cotto, was arrested.”

Last year, Terrell filed a $175 million notice of claim against the city that says it created a “cottage industry” of gang-bangers who collect taxpayer money with bogus complaints of police misconduct.

Terrell currently remains on modified duty with the NYPD, a department spokesman said Friday.

The 45-year-old cop, who joined the NYPD in 2002 and has made more than 1,000 arrests, raked in a total pay of $109,606 last year, according to data posted by SeeThroughNY.