LANCASTER, Calif. - A Rosemead man was sentenced today to almost 40 years behind bars for extorting young girls into sending him naked photos of themselves.

Cesar Mauricio Estrada-Davila was sentenced to 39 years and eight months in state prison immediately after pleading guilty to dozens of felony counts, court officials said.

Estrada-Davila was 19 years old in August 2015 when he was charged with nearly 150 criminal counts, ranging from possession of child pornography to extortion to lewd acts on a child, according to the District Attorney's Office.

RELATED | Man Arraigned on Almost 150 Counts of Revenge Porn, Lewd Acts

Estrada-Davila reached out to young girls on a social media website, claiming to be a modeling agent and insisting he could make them famous. He would then ask the girls to send them photos of themselves in their underwear, according to prosecutors.

After receiving those photos, he threatened to forward the pictures to the girls' friends and family unless they sent him nude photos of themselves, prosecutors said.

One of the girls eventually told her parents, who alerted authorities. Prosecutors said there were 21 victims ranging in age from 12 to 17.