A former jail guard who admitted to a behind-bars affair with a man convicted of killing two New York City police officers has been sentenced to one year in prison.

Nancy Gonzalez received the sentence Wednesday in federal court in Brooklyn.

Gonzalez pleaded guilty in July to charges of unlawfully having sex with Ronell Wilson in 2012 while working the night shift at a federal jail in Brooklyn. She became pregnant a few months into the affair and had a baby.

Wilson was convicted in the 2003 shootings of two undercover officers in a gun sting gone awry. He was sentenced to death last year at a retrial.