A man from upstate New York could spend the rest of his life in prison after pretending to be a teen online to coerce his 14-year-old daughter into sending him nude photos, then using them as leverage to sexually abuse her.

Ldprod / Getty Images

The 41-year-old man, whose name is being withheld to protect the identity of his daughter, sobbed in court when he pleaded guilty to child porn–related charges, Syracuse.com reported.

The scheme began in 2013, when the father began posing as a 16-year-old boy on social media accounts like Instagram and chatting with his daughter, Syracuse.com reported, citing court records.

The two eventually started texting and referring to each other as boyfriend and girlfriend.

Over time, the man began asking his daughter for nude pictures and "close-ups," Syracuse.com reported.

Triloks / Getty Images

The teen initially resisted, but eventually caved. Over time, however, she grew wary of the relationship and tried to end it, according to Syracuse.com.

Her father responded by saying, "I tell u what u want to be gone then send me nudes and close ups and I will let u go."

"I'm not going to do that," she replied, according to Syracuse.com. "That's another reason I'm leaving. All you talk about is sex sex and more sex. Honestly that is not what a relationship is about."

The man then began threatening to send the photos to her father if the teen didn't send more pictures.

"My life is ruined," the girl wrote, according to Syracuse.com.

The man then killed off his alter ego by having the "boy's mom" tell his own daughter that her boyfriend had "committed suicide," Syracuse.com reported.

From2015 / Getty Images

The man then told his daughter her "boyfriend" had sent him the nude photos, and used them as leverage to sexually assault her.

After a year of abuse, the child eventually confided in a school nurse about what was happening.

After an investigation, authorities traced the origin of the texts to the girl's home, Syracuse.com reported.

Prosecutor Lisa Fletcher said the man's crime was made even more heinous because it involved his own child.

He pleaded guilty to 12 child porn–related charges on Monday and faces a prison sentence of 250 years. The man is also facing sexual abuse charges in county court.

"It is very emotional," he told the judge through tears, according to Syracuse.com. "I'm giving away many years of my life."

Stephanie McNeal is a social news editor for BuzzFeed News and is based in New York.