A man who allegedly sprayed children with a squirt gun loaded with his semen has been sent to prison for 18 years.

Kevin Jaramillo pleaded no contest to charges of child abuse without great bodily harm, sexual exploitation and criminal sexual contact before a courtroom in Albuquerque, N.M., on Friday, according to KCCI 8 Des Moines.

Jaramillo must serve 18 years in prison as part of the plea agreement. He was originally set to face more than 57 years in prison.

The suspect's attorney, Robert Cooper, said he had discussed with his client whether or not he should accept the plea deal.

"I do think it's a unique legal issue whether sperm being squirted is child abuse," Cooper said before Second Judicial District Judge Stan Whitaker, according to the Syracuse Post-Standard. "It's one of the things we talked about."

The 35-year-old man approached several children around New Mexico's most populous city in March 2014 and squirted them with the toy while capturing it all on tape. The ages of the victims ranged from 9 to 18.

Jaramillo said drugs, alcohol and his mental illness were to blame for the incident. One of the victims' fathers remarked that Jaramillo  took away his daughter's innocence, according to Metro UK.