ROCKFORD, Ill. (AP) — An Illinois man has been sentenced to 30 years in prison for sexually assaulting a woman he took hostage at gunpoint last year during a bank robbery that led to a police standoff.

Nicholas August, of Rockford, was sentenced Friday after pleading guilty to two counts of aggravated criminal sexual assault with a weapon. Under his plea agreement, 22 other counts he had faced, including armed robbery, were dismissed. August, 39, must serve at least 85% of his sentence.

READ MORE: As Jury Deliberates In R. Kelly Sex Trafficking Case, What Impact Will Verdict Have On His Future Trials In Chicago?

Nicholas August (Source: Winnebago County Sheriff)

Police said August entered Heritage Credit Union in Rockford on Jan. 3, 2020, and threatened employees during the robbery with a pellet gun that resembled a real firearm. He then took a female employee hostage and ordered other employees out of the building, authorities said.

August sexually assaulted his hostage during the seven-hour standoff with police before he released her and surrendered.

READ MORE: Cook County Circuit Court Website Back Online, After Weeks-Long Outage Caused By Breach

August had a history of accusations of violence against women before the standoff, the Rockford Register Star reported. Seven women had sought at least 12 court orders of protection against August since 2002. Those orders described increasingly violent episodes, but most of the women never filed criminal complaints.

Rockford, which is about 90 miles (144 kilometers) northwest of Chicago, is Illinois’ second-largest city, with roughly 150,000 residents.

MORE NEWS: Chicago Weather: Cold Front Passes Soon

(© Copyright 2021 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)