GREENSBURG, Pa. — A Pennsylvania man who had sexual contact with a 14-year-old girl as part of a vampire role-playing game that included drinking her blood must spend 10 years on probation, the first two confined to his home.

Westmoreland County Richard McCormick Jr. imposed the probation sentence for Jonathan Ryan Davis on Thursday despite calls by prosecutors that he be imprisoned. Davis, of Vandergrift, pleaded guilty in November to statutory sexual assault, indecent assault and corruption of minors for a December 2014 incident with the girl in a church stairwell after both had been drinking.

Davis told police he, the victim, and two other girls drank blood drawn from their arms as part of a role-playing game he read about online. He pleaded guilty to disorderly conduct for the blood-drinking episodes.

Assistant District Attorney Chris Flanigan wanted Davis to spend more than two years in prison. Davis previously was convicted in juvenile court for impregnating a 12-year-old girl. He didn’t seem to learn anything from the probation he received in that case, Flanigan said.

But defense attorney Adam Gorzelesky argued that Davis’ behavior and cooperation with police since his arrest warranted probation, which would allow him to continue receiving counseling. Two psychologists testified Davis would benefit from continued counseling.

McCormick’s sentence was a compromise that the judge said “will meet the requirements of punishment, rehabilitation and the protection of the community.”

While on probation, Davis can’t go online for recreational purposes, view pornography, drink alcohol or go to bars and clubs. He also cannot have unsupervised contact with minors.