Milwaukee County is not liable to pay a 2017 federal jury award of $6.7 million to a woman who was raped in the county's jail by a guard in 2013, a federal appeals court ruled Monday.

The sexual assaults of an inmate were not related to the corrections officer's job duties as a county employee and "no reasonable jury could find the sexual assaults were in the scope of his employment," the appeals court for the U.S. Seventh Circuit said in its decision.

Milwaukee County "has a zero-tolerance policy prohibiting corrections officers from having any sexual contact with inmates," the court said. In addition, training of corrections officers includes instruction on avoiding sexual contact with inmates.

Milwaukee County is protected from paying damages under those circumstances, the appeals court said.

A state indemnification law that enables public employees to perform their duties without fear of having to pay out of their personal pockets for their performance of those duties "does not make public employers absolute insurers against all wrongs," the court said.

The guard, Xavier Thicklen, was hired to work as a corrections officer in the jail in 2012.

The victim was pregnant when she was booked into the jail in early 2013.

The woman, who was 19 in 2013, told the Milwaukee Journal Sentinel in 2014 that Thicklen assaulted her five times, including once when she was more than seven months pregnant and once within days of her return to the jail after giving birth.

In the federal jury trial, the woman described how she was shackled as she went through labor in late 2013 at a local hospital where she gave birth to a girl.

"Regardless of this legal victory, the county and the Milwaukee County Sheriff's Office continue to work together to ensure that every inmate at the jail or House of Correction is treated with dignity and respect," she said.