Detective David E Abbott Jr, the cop who allegedly took the photos committed suicide in 2015 after he was accused of molesting two boys in an unrelated case

Judge ruled Tuesday: 'We cannot perceive any circumstance that would justify a police search requiring an individual to masturbate in the presence of others'

Sims filed the lawsuit saying that the cops had violated his civil

A cop allegedly violated a teenager's Fourth Amendment rights by asking him to 'make his penis erect' in order to take a photo, according to a Virginia judge.

Trey Sims was 17 years old when he was accused of sending pictures of his genitals to his then 15-year-old girlfriend in 2014.

That same year, Sims, of Manassas, Virginia, was charged with child pornography.

In May 2016, Sims, now 20, filed a federal civil rights suit alleging that Detective David E Abbott Jr, had forced him to pull down his trousers so cops could take pictures of his penis to compare with the graphic images on his girlfriend's phone.

Abbott obtained a search warrant authorizing photographs of Sims' 'naked body, including his erect penis', Fourth Circuit Judge Barbara Keenan wrote in court documents released on Tuesday.

Detective David E. Abbott Jr (right) allegedly violated Trey Sims' (left in 2014) Fourth Amendment rights by asking him to 'make his penis erect' in order to take a photo after Sims was accused of sending a photo of his genitals to his then 15-year-old girlfriend

In May 2016, Sims filed a federal civil rights suit alleging that Detective David E. Abbott Jr, had forced him to pull down his trousers to take pictures of his penis to compare with the graphic images on his girlfriend's phone. The judge's decision on the case was released on Tuesday

According to the documents, Abbott obtained a second search warrant the day after Sims was arraigned on charges of possession and distribution of child pornography.

'Abbott informed Sims' attorney that Abbott again 'proposed to take photographs of [Sims'] erect penis' to be used as evidence.

The detective also stated that if Sims could not achieve an erection, Sims would be taken 'to a hospital to give him an erection-producing injection'.

Abbott was able to obtain the second search warrant from a Virginia magistrate, which authorized additional photographs of Sims' naked body, including his erect penis.

But before that warrant was executed, the Manassas City Police Department issued a statement explaining that the department's policy did not permit 'invasive search procedures of suspects in cases of this nature'.

Sims (pictured) filed the lawsuit in 2016 against Kenneth Labowitz, the administrator of Abbott's estate after Abbott killed himself in 2015

Abbott was later accused of molesting two young boys in an unrelated case and killed himself in 2015 as police moved to arrest him and before Sims filed the lawsuit in 2016.

Sims therefore filed the lawsuit against Kenneth Labowitz, the administrator of Abbott's estate, and Claiborne Richardson II - the assistant Prince William commonwealth's attorney who police said instructed Abbott to get the warrant.

Shortly after Sims filed the suit, a district court determined that the administrator (Labowitz) was entitled to qualified immunity and dismissed Sims' complaint.

Sims then filed an appeal and on Tuesday, the US Court of Appeals announced their decision to reverse the district court's decision.

'Construing the facts in the light most favorable to Sims, a reasonable police officer would have known that attempting to obtain a photograph of a minor child's erect penis, by ordering the child to masturbate in the presence of others, would unlawfully invade the child's right of privacy under the Fourth Amendment,' court documents stated.

Labowitz, the administrator for Abbott's estate, 'maintains that Sims failed to allege sufficient facts to support a Fourth Amendment violation because Abbott’s search did not place Sims at risk of physical harm, and because the search did not physically invade Sims’ body'. But the appeals court disagreed.

'We cannot perceive any circumstance that would justify a police search requiring an individual to masturbate in the presence of others,' the documents read.

The 2014 incident began when Sims' girlfriend sent nude photos of herself to him by cell phone.

He had then responded with 'an explicit video of himself via his cell phone,' Sims' lawyer attorney Victor M. Glasberg said.

His girlfriend's mother had then discovered the video and reported him to the police who charged him with manufacturing and distributing child porn. The girl, who was 15 at the time, was never charged.

Glasberg claims his client was the only one charged simply because he is male.

Sims was arrested and placed under home confinement in January 2014. He was told he was only allowed to leave home to go to school and back. He was not allowed to use his cell phone or social media.

At his trial, Richardson was forced to dismiss the charge because they couldn't prove Sim's age at the time of the offense.

The lawsuit states that Richardson had then directed Abbott to arrest Sims, then 17, and hold him at a juvenile center.

It was while he was in custody at the center that the lawsuit states that Abbott ordered Sims to pull down his pants and took photos of his flaccid penis on his cell phone. The teen was allegedly warned if he didn't comply, Abbott would force him to do so.

While taking the photos, Sims was ordered to position his penis for the pictures 'as though masturbating,' Glasberg said. 'Thereby creating child pornography.'

In August 2014, Sims went on trial accused of the lesser charge of child porn possession. His charges were dismissed the following year (file image)

Glasberg said that Abbott was 'simply gratifying his own perverse pleasures' by photographing Sims who was left humiliated by the experience.

Then in June 2014, Abbott said he would need photos of Sims' erect penis to properly compare with the video.

A judge ruled that prosecutors could not use the photos of Sims during his August 2014 trial where he faced the lesser charge of child porn possession.

The judge decided not to defer his finding on guilt after a year of probation for Sims in which he was ordered to carry out 100 hours of community service, and placed him on curfew. He was not allowed to use social media or text.

After the year's probation, his charge was dismissed.

That following year, Abbott was accused of having a sexual relationship with two of the young hockey players that he coached.

The lawsuit states that the police officer and attorney's actions equaled two counts of indecent liberties by a custodian and two counts of use of a communication device to solicit a sexual offense.