A west suburban man has been sentenced to six years in prison for sexually assaulting a child he knew last year.

Fernando Rogel-Vargas, 44, pleaded guilty Friday to criminal sexual assault in exchange for the six-year sentence, according to the Kane County state’s attorney’s office.

On the afternoon of Oct. 22, 2015, Rogel-Vargas assaulted a child he knew that was under the age of 12, a statement from prosecutors said.

Rogel-Vargas, of the 1200 block of East Wilson Street in Batavia, will receive credit for 356 days served in the Kane County jail, according to the state’s attorney’s office.

In addition to the prison sentence, he must register for life as a sexual offender.