STAMFORD -- A Norwalk teenager charged with possession of child pornography after his 14-year-old Greenwich girlfriend "sexted" nude photos to his cellphone was granted a special form of probation after spending the last three months in jail.

The case serves as a cautionary tale of what can happen when minors, engaged in a relationship, trade instantly transmitted photos that later are interpreted as serious criminal acts.

The teen's release came Friday after he was granted participation in a court diversionary program for first-time offenders that would keep his criminal record clean.

With charges of possession of child pornography and promoting a minor in an obscene performance dropped by the state, the youth must complete two years probation without getting into any trouble or he could still be prosecuted on a charge of risk of injury to a minor.

The deal was struck in a Stamford courtroom by Senior Assistant State's Attorney Richard Colangelo and defense attorney Joseph Jaumann after the youth agreed to have his bail bond raised by $5,000 on Nov. 9 and spend the next three months in jail.

The 19-year-old youth, who Jaumann said is trying to enlist in the U.S. Marine Corps with a clean arrest record, was supposed to be released a week ago Friday, but his court appearance was delayed another week by the snowstorm.

Since the incident occurred when the Norwalk teen was still a juvenile, Hearst Connecticut Newspapers are withholding his name.

The youth came to be investigated in mid-January 2012 after the girl, then 14, told a Greenwich school resource officer that she had sent nude pictures of herself to her boyfriend. The girl said she sent the pictures to the boy's cellphone when the boy, who was then 17, was in Oklahoma because he asked her for them.

The girl told police that she felt forced to send the pictures because if she did not she believed the boy would break up with her, the youth's four-page arrest affidavit said. There are no allegations that the youth inappropriately touched the girl when they dated.

The girl also said that the Norwalk youth wanted more pictures and even threatened to send the pictures to the place where the two met while working together over the summer.

By the time the allegations were made to police, the girl's phone had been damaged and she no longer had the same phone.

A few days after police began the investigation, the Norwalk youth voluntarily went to Greenwich to be interviewed by police. During the interview, he at first denied having any pictures of the girl on the phone he carried into the police department with him.

When asked to turn the phone over to police for an examination, the youth became reluctant, saying that he did not want to get the girl into trouble, the affidavit said.

The youth "related that the Greenwich Police Department is aware that the victim did something wrong and that what she did was illegal," the affidavit said.

When asked what the girl did, the youth told police that the girl sent him four or five naked photos of herself and that he never sent them to anyone else.

According to the affidavit, police found eight naked photos of the girl embedded into the text message icon of the phone. He was then arrested Feb. 21, 2012, on felony charges that could have resulted in a years-long jail sentence.

Judge Bruce Hudock said he signed off on the agreed upon resolution because of the small age difference between the two players in the case and because the victim agreed to the disposition. He forbade the youth from getting back into contact with the minor girl.

Colangelo said, "In this case the victim is happy with the disposition reached between the state and defense attorney. We believe it is appropriate in this matter."

While his client was being released after the hearing, Jaumann said, "I think we did the right thing here. Justice was served and this disposition allows my client to have a future with no criminal record."