A Montgomery County teenager pleaded guilty to posting nude pictures of teen girls from high school online and was sentenced to probation on Tuesday.

Brandon Tyler Berlin, 19, was sentenced to two years of probation, and ordered by a judge to perform 200 hours of community service, pay a $250 fine and undergo a "psychosexual evaluation," the Philadelphia Inquirer reported. He pleaded guilty to transmission of sexually explicit images by a minor, a misdemeanor.

RELATED: 'I prolly had ur pics' teen charged for underage porn Dropbox

Berlin, of North Wales, who was 18 and a high school senior when he was arrested in September, reportedly apologized in court for posting nude pictures of underage classmates at North Penn High School to a public Dropbox folder which was named "I prolly had ur pics."

That phrase was also Berlin's senior quote in the high school yearbook, prosecutors said at the time of Berlin's arrest.

He said the pictures he collected were given to other teenage boys by their girlfriends, and to him by his girlfriend at the time, according to the Inquirer, telling the judge, "I'm very sorry for what I did."

About 30 photos were collected, and many students were reportedly involved, but only Berlin was charged.

Berlin was charged as an adult although most of the crimes occurred when he was a minor.

Ambler Borough authorities were first alerted by a female student in March 2015 to the online cache of underage porn. 

The investigation eventually expanded to include police from Towamencin Township, Upper Gwynedd Township, North Wales Borough, Hatfield Township, Lansdale Borough, Montgomery Township and the Montgomery County Detectives Bureau, according to prosecutors.