"This was really stupid", judge Matthias Vaske of the city court in Neustrlitz, Mecklenburg-Western Pomerania, told the men as he sentenced them to a five-month suspended sentence and a €500 fine.
The case began in 2011, when one of the men, then 18, received naked photos from his 17-year-old girlfriend of a "child-pornographic nature".
He sent the photos to his older friend, who then distributed them to other people via the internet – despite the fact that the couple had agreed that he should delete the photos when their relationship ended.
The girlfriend was furious when she found out that her boyfriend had shared the images and a police investigation was launched, finding that the older man had taken explicit pictures and videos of his own girlfriend.
"Investigators found around 700 files and photos of a child-pornographic nature", state prosecutor Wolfgang Köppen said.
But the judge told the pair that they had "earned a second chance" as they appeared so contrite and remorseful in court.