A Lansdale man has admitted to raping a 12-year-old child.

The Montgomery County District Attorney's Office says Lafonsa Perry, 24, pleaded guilty Monday to one count of rape of a child. He's facing up to 30 years in prison.

Police say they began their investigation after an adult relative of the girl reported finding disturbing posts on her Facebook page.

The Facebook posts between the girl and a man, subsequently identified as Perry, included discussions of a sexual nature, including engaging in sexual intercourse.

Mission Kids interviewed the victim, who said she smoked marijuana with Perry while in his bedroom and that they engaged in sexual intercourse, police said.

A search of Perry's house uncovered a small amount of marijuana, a digital scale and other related paraphernalia, police said.

The D.A.'s office says Perry will be assessed to determine if he is a sexually violent predator before he is sentenced.