A suburban Chicago man has pleaded guilty to paying to engage in a sexual relationship with two minor girls and will serve a seven-year prison term.

Andres Alonso on Thursday agreed to the sentence for a guilty plea to involuntary sexual servitude of a minor.

Prosecutors say the 22-year-old Aurora man went to a hotel planning to have sex with what he believed would be a 14-year-old and a 15-year-old girl. But it was part of a sting.

Alonso had responded to an online ad and agreed with someone he believed was the girls' mother to pay $100 for 30 minutes of sex. Officers from Homeland Security Investigations and Aurora police arrested him at the hotel after he offered money.

Alonso will receive credit for time served since his 2014 arrest.