Nancy Gonzalez, the federal prison guard accused of becoming pregnant by New York City cop killer Ronell Wilson, has drawn criticism for poor judgment. But Gonzalez isn't the first prison guard who has become pregnant by an inmate.

Gonzalez, 29, faces 15 years in prison for allegedly having sex with Wilson, 30, of Staten Island, who was convicted of the 2003 execution-style killings of undercover detectives Rodney Andrews and James Nemorin.

According to a complaint filed by the U.S. attorney’s office in Brooklyn, Gonzalez was recorded having a telephone conversation with another inmate about how she became pregnant with Wilson’s child.

The prison guard allegedly said in the complaint that she was working in a unit where “there was an inmate there that for whatever reason, I took a chance because I was so vulnerable and wanted to be loved and now I am carrying his child.”

Gonzalez, who found out she was pregnant in June, told the inmate she “kind of got sucked into his [Wilson’s] world” and “felt like, well, why not give him a child as far as giving him some kind of hope."

Wilson, whose death penalty sentence was withdrawn for procedural reasons, allegedly wanted to get a woman pregnant before being executed.

At his 2007 trial, a friend of the cop killer said he received a letter from Wilson.

“I just need a baby before the pigz try to take my life,” he allegedly wrote, an article in the New York Post, said. “I need to have something behind.”

Gonzalez allegedly complied with Wilson’s wishes and had sex with him over three weekends, with the purpose of getting herself pregnant, according to the criminal complaint.

As Wilson awaits a penalty phase retrial for the murders of Nemorin and Andrews, some speculated that his plan to get the prison guard pregnant was a ploy to evade the death penalty.

Wilson’s attorneys are arguing that he be spared death because he has a low I.Q. They said executing him would constitute cruel and unusual punishment.

Michael Palladino, president of the Detectives' Endowment Association union, said he isn't buying it.

"If this was done by design, it's not the actions of a person who is mentally retarded," he told the New York Daily News.  "It's a devious plot to avoid the death penalty."

Gonzalez's story went viral on Tuesday, and she swiftly drew criticism. “I can’t believe she would be that crazy,” an unidentified former detective told the New York Post.

Gonzalez isn’t the first prison guard who has become pregnant by an inmate. In a similar case, a female prison guard in Sweden became pregnant by a convicted rapist in 2010 after carrying on an affair with the prisoner.

“We started talking to one another and afterwards it developed into a relationship,” the guard told Swedish newspaper Aftonbladet.

The woman told the newspaper that she forgave the then-38-year-old rapist for his crimes, which included a sex attack in the prison.

“I know he was convicted for a rape in the visitors’ room, but that was three years ago,” said the female guard, who no longer works at the Swedish prison.

Former boxing champion Mike Tyson stirred controversy when he claimed last year that he impregnated a prison guard while serving time on rape charges. Tyson alleged in an ESPN interview that the guard became pregnant, but she did not give birth to the child.

"I didn't talk about getting a prison official pregnant," Tyson told ESPN’s Rick Reilly, about details he left out of an interview with the sports network. “Oh, yeah. In prison, stuff happens. But she had no baby."

In July 2003, a Las Vegas prison guard was placed on administrative leave while authorities investigated whether he impregnated an inmate at the Southern Nevada Women’s Correctional Center. The inmate, described as a woman in her 20s, was four-months' pregnant when she made the allegations.

"She will have a reminder of this incident for the remainder of her life,” her attorney, Scott Olifant, said at the time. "They do not have to raise a baton or make any threat to intimidate an inmate.”

In both New York and Nevada, it is illegal for prison guards to have sexual relations with inmates because it presents a huge security risk. In the Gonzalez incident, authorities said they were concerned that she would be sympathetic to Wilson and aid him in an escape attempt.