McLEAN, Va. — Police in Virginia on Thursday backed off efforts to take sexually explicit photos of a 17-year-old to prove a sexting case against him.

Police and prosecutors faced a wave of criticism following news media reports that they had obtained a warrant to take photos of the teenager’s erect penis. Police wanted the pictures to compare against photos he is accused of sending to his 15-year-old girlfriend at the time.

On Thursday, Manassas police Lt. Brian Larkin said police will not proceed with the plan to take the pictures and will allow a search warrant authorizing the photos to expire.

Privacy advocates had criticized the plan as a violation of the teenager’s constitutional rights.

The teenager’s aunt, who serves as his legal guardian, said Thursday that she would be ecstatic if police follow through on their statement that they will no longer pursue the photos. But she said she won’t be fully satisfied until the case against her nephew is dropped entirely.

The aunt had sent her nephew to West Virginia, where he grew up, for the past several weeks, fearful that police would show up to enforce the search warrant. The teenager’s defense lawyers said authorities had explained that they intended to take the teen to a hospital and chemically induce an erection.