Police and prosecutors in Virginia allegedly obtained a search warrant to photograph the erect penis of a teenager who is facing child pornography charges in a sexting case, the Washington Post reported on Wednesday.

Lawyers for the 17-year-old boy, whose name is being withheld, complained to the newspaper about the search warrant, allegedly obtained by the Manassas City police and Prince William County prosecutors. The teen is facing felony charges for child pornography, stemming from an alleged instance of receiving sexual pictures from his 15-year-old girlfriend and sending a video to her, according to the Post. If convicted, he could be sentenced to incarceration and be forced to register as a sex offender, the newspaper reported.

One of the teen’s lawyers, Jessica Harbeson Foster, said she was told that the police would “just take him down to the hospital, give him a shot and then take the pictures that we need.” So far, a local judge has allowed the teen to avoid the warrant, the Post reported, letting him leave the area without complying.

“The prosecutor’s job is to seek justice,” Foster said. “What is just about this? How does this advance the interest of the Commonwealth? This is a 17-year-old who goes to school every day, plays football, has never been in trouble with the law before. Now he’s saddled with two felonies and the implication that he’s a sexual predator. I don’t mind trying the case. My goal is to stop the search warrant. I don’t want him to go through that. Taking him down to the hospital so he can get an erection in front of all those cops, that’s traumatizing.”

Law enforcement officials declined to comment to the Post. The next court date in the case is July 15.