Story highlights Another judge grants a second stay on a separate defense appeal

"We're hoping the stays stay in place," says defense attorney

Joseph Paul Franklin had been set to die shortly after midnight Tuesday

He faced execution for a 1977 killing outside a St. Louis synagogue

A federal court has granted a stay of execution for white supremacist serial killer Joseph Paul Franklin, hours before he was scheduled to die by lethal injection in Missouri.

Franklin is on death row for the 1977 murder of Gerald Gordon outside a synagogue in St. Louis. He's been blamed for a total of 22 killings between 1977 and 1980 in a bid to start a race war.

He is challenging Missouri's decision to use the drug pentobarbital in its lethal injection protocol, arguing it would violate the Constitution's ban on cruel and unusual punishment.

U.S. District Judge Nanette Laughrey granted a stay on Tuesday, finding Franklin's lawyers showed the use of pentobarbital carried "a high risk of contamination and prolonged, unnecessary pain beyond that which is required to achieve death."

Photos: Infamous serial killers Photos: Infamous serial killers John Wayne Gacy killed 33 men and boys between 1972 and 1978. Many of his victims, mostly drifters and runaways, were buried in a crawlspace beneath his suburban Chicago home. Here's a look at some other notorious convicted serial killers. Hide Caption 1 of 26 Photos: Infamous serial killers Jeffery Dahmer was sentenced to 15 consecutive life terms for the murders of 17 men and boys in the Milwaukee area between 1978 and 1991. Dahmer had sex with the corpses of his victims and kept the body parts of others, some of which he ate. Dahmer and another prison inmate were beaten to death during a work detail in November 1994. Hide Caption 2 of 26 Photos: Infamous serial killers Law enforcement officers meet in San Francisco in 1969 to compare notes on the Zodiac Killer, who is believed to have killed five people in 1968 and 1969. The killer gained notoriety by writing several letters to police boasting of the slayings. He claimed to have killed as many as 37 people and has never been caught. Hide Caption 3 of 26 Photos: Infamous serial killers Authorities said DNA recovered from the body of Mary Sullivan matches that of her suspected killer, the confessed Boston Strangler, Albert DeSalvo. After a sample was secretly collected from a relative, DeSalvo's body was exhumed in July 2013 for more DNA testing. From mid-1962 to early 1964, the Boston Strangler killed at least 13 women. DeSalvo was stabbed to death in 1973 while serving a prison sentence for rape. Hide Caption 4 of 26 Photos: Infamous serial killers Ed Gein killed at least two women and dug up the corpses of several others from a cemetery in Wisconsin, using their skin and body parts to make clothing and household objects in the 1950s. Hide Caption 5 of 26 Photos: Infamous serial killers In 1973, Juan Corona, a California farm laborer, was sentenced to 25 consecutive life sentences for the murders of 25 people found hacked to death in shallow graves. Hide Caption 6 of 26 Photos: Infamous serial killers Joseph Paul Franklin was convicted in 1997 of murdering Gerald Gordon outside a St. Louis synagogue in 1977. Franklin was also convicted of at least five other murders, receiving a string of life sentences, but he suggested that he was responsible for 22 murders. He was best known for shooting Hustler publisher Larry Flynt, who was paralyzed from the attack. Franklin was executed in November 2013. Hide Caption 7 of 26 Photos: Infamous serial killers In 1977, David Berkowitz, also known as Son of Sam, confessed to the murders of six people in New York City. Berkowitz, now serving six consecutive 25-to-life sentences, claimed that a demon spoke to him through a neighbor's dog. Hide Caption 8 of 26 Photos: Infamous serial killers Cousins Kenneth Bianchi, seen here, and Angelo Buono were charged with the murders of nine women between 1977 and 1978. Also known as the Hillside Stranglers, the cousins sexually assaulted and sometimes tortured their victims, leaving their bodies on roadsides in the hills of Southern California. Hide Caption 9 of 26 Photos: Infamous serial killers Wayne Williams killed at least two men between 1979 and 1981, and police believed he might have been responsible for more than 20 other deaths in the Atlanta area. Williams was convicted and sentenced to two life terms in 1982. Hide Caption 10 of 26 Photos: Infamous serial killers After serving 15 years for murdering his mother, Henry Lee Lucas was convicted in 1985 in nine more murders. Lucas was the only inmate spared from execution by Texas Gov. George W. Bush. Hide Caption 11 of 26 Photos: Infamous serial killers Richard Ramirez, also known as the Night Stalker, was convicted of 13 murders and sentenced to death in California in 1989. The self-proclaimed devil worshiper found his victims in quiet neighborhoods and entered their homes through unlocked windows and doors. Hide Caption 12 of 26 Photos: Infamous serial killers During a routine traffic stop, a police officer found a dead U.S. Marine in the front seat of a car driven by Randy Steven Kraft. Kraft was linked to 45 murders and sentenced to death in 1989. He would pick up hitchhikers, give them drugs and alcohol, sexually assault them and then mutilate and strangle them. Hide Caption 13 of 26 Photos: Infamous serial killers Ted Bundy raped and killed at least 16 young women in the early to mid-1970s before he was executed in 1989. A crowd of several hundred gathered outside the prison where he was executed, and they cheered at the news of his death. Hide Caption 14 of 26 Photos: Infamous serial killers Joel David Rifkin was stopped by police for driving without a license plate when a body was found in his pickup. Rifkin killed 17 women in New York between 1991 and 1993 and was sentenced to life in prison. Hide Caption 15 of 26 Photos: Infamous serial killers Charles Ng, seen here, and accomplice Leonard Lake tortured, killed and buried 11 people in northern California between 1984 and 1985. After the men were arrested for shoplifting, police found bullets and a silencer in their car and took them into the police station for questioning. Lake killed himself there with a cyanide pill. Ng was later sentenced to death. Hide Caption 16 of 26 Photos: Infamous serial killers Robert Lee Yates Jr. killed 15 people, most of them between 1996 and 1998. He buried one of them in a flower bed by his house in the Spokane, Washington, area. Most of his victims were prostitutes or drug addicts he killed in his van. He is on Washington's death row. Hide Caption 17 of 26 Photos: Infamous serial killers Gary Leon Ridgway, also known as the Green River Killer, confessed to 48 killings after his DNA was linked to a few of his victims. Remains of his victims, mostly runaways and prostitutes, turned up in ravines, rivers, airports and freeways in the Pacific Northwest. Hide Caption 18 of 26 Photos: Infamous serial killers Aileen Wuornos was executed in Florida in 2002 for the murders of seven men whom she had lured by posing as a prostitute or a distressed traveler. Hide Caption 19 of 26 Photos: Infamous serial killers Derrick Todd Lee was accused of raping and killing six women in Baton Rouge, Louisiana, between 2001 and 2003. He was arrested in Atlanta for the murder of Charlotte Murray Pace, convicted in 2004 and sentenced to death. Hide Caption 20 of 26 Photos: Infamous serial killers Danny Rolling pleaded guilty to the 1990 murders of five students he raped, tortured and mutilated in Gainesville, Florida. Rolling was also found responsible for a 1991 triple homicide in Shreveport, Louisiana, and was executed in 2006. Hide Caption 21 of 26 Photos: Infamous serial killers Angel Maturino Resendez, also known as the Railway Killer, was a drifter from Mexico. During the 1990s, he would rob and kill his victims near railroad tracks on both sides of the border and then hop rail cars to escape. Resendez was executed in 2006. Hide Caption 22 of 26 Photos: Infamous serial killers Pig farmer Robert Pickton was charged with 26 counts of murder after police found the bodies of young women on his farm in Port Coquitlam, British Columbia. He was convicted of six murders in 2007, and he is serving a life sentence. Hide Caption 23 of 26 Photos: Infamous serial killers The BTK Strangler, Dennis Rader, killed 10 people between 1977 and 1991 in the Wichita, Kansas, area. He was sentenced to 10 consecutive life terms in 2005. Rader named himself BTK, short for "bind, torture, kill." Hide Caption 24 of 26 Photos: Infamous serial killers Police found the decomposing and buried bodies of 10 women and the skull of another woman at the Cleveland home of ex-Marine Anthony Sowell. He was convicted and given the death penalty in 2011. Hide Caption 25 of 26 Photos: Infamous serial killers Chester Dewayne Turner was sentenced to death for murdering 14 women and one victim's unborn fetus in the Los Angeles area between 1987 and 1998. Turner was later convicted and sentenced to death for four more murders. Hide Caption 26 of 26

"Given the irreversible nature of the death penalty and plaintiffs' medical evidence and allegations, a stay is necessary to ensure that the defendants' last act against Franklin is not permanent, irremediable cruel and unusual punishment in violation of the Eighth Amendment," Laughrey wrote.

Another federal judge granted a second stay Tuesday, based on a separate defense petition contesting Franklin's competency.

"The Court concludes that a stay of execution is required to permit a meaningful review," U.S. District Judge Carol Jackson wrote.

The state is appealing both stays to the 8th U.S. Circuit Court of Appeals.

Defense attorney Jennifer Herndon said that she expects that court will rule within the next day.

The execution warrant window is 24 hours, meaning that if the court rules against the stays, Franklin could still be put to death on Wednesday.

"We're hoping the stays stay in place," Herndon said, adding that she would be surprised if both were vacated.

Franklin had been scheduled to be put to death shortly after 12 a.m. Wednesday (1 a.m. ET) at the state prison in Bonne Terre, Missouri, about 60 miles south of St. Louis. But Missouri and other states that conduct executions have had to scramble for new drugs after European-based manufacturers banned American prisons from using their drugs in executions.

Missouri had planned to use propofol, the surgical anaesthetic made infamous by the death of pop star Michael Jackson. But Gov. Jay Nixon reversed that decision after being warned the European Union -- whose members forbid capital punishment -- might halt shipments of the drug, leading to shortages for medical purposes.

In October, the state announced it would use pentobarbital, which would be provided by an unnamed compounding pharmacy. Franklin's lawyers argued that would raise the risk of contamination and a painful death.

Nixon denied clemency for Franklin on Monday, arguing Franklin had committed "merciless acts of violence, fueled by hate."

In addition to the killings, Franklin admitted to the attempted assassinations of Hustler magazine publisher Larry Flynt in 1978 and civil rights leader Vernon Jordan in 1980. Flynt, who was paralyzed by Franklin's bullet, has called for clemency for Franklin, saying "the government has no business at all being in the business of killing people."