WASHINGTON — A Manassas City, Virginia, teen – charged with two child pornography counts for allegedly “sexting” an explicit video to his 15-year-old girlfriend – was placed on a year’s probation Friday by a Prince William County judge, who said he would consider dismissing both counts if the teen stays trouble-free for a year.

The case attracted widespread attention because of attempts by the Manassas police and Prince William County prosecutors to take photos of the 17-year-old’s erect penis, to compare with the video sent to his girlfriend in January. The police issued a statement Friday saying that the photos were “necessary for the prosecution to explore all legal avenues of evidence collection in order to prepare for trial.”

In June, Assistant Commonwealth’s Attorney Claiborne Richardson II instructed police Detective David Abbott to obtain a search warrant for the teen, according to the police statement, but Abbott crossed out the words “a photograph of the suspect’s erect penis” and took other photos. The following month, Richardson directed Abbott to obtain a second search warrant for a photograph of an erection, according to the police statement. In the second warrant, filed publicly last week, the explicit words were not crossed out.

After the teen and his lawyers went public with the case, the authorities decided not to serve the warrant or use the photos from the June warrant. The police also issued a statement saying it was “not the policy of the Manassas City Police or the Commonwealth Attorney’s office to authorize invasive search procedures of suspects in cases of this nature,” although by then they had obtained two warrants.

Instead, photos of both the male and female teens in various states of undress were entered into evidence Friday before Prince William County Juvenile and Domestic Relations Court Judge George DePolo, as well as a sexually explicit video. But the face of the person in the video could not be seen, nor could any identifying marks.