A Florida woman serving 20 years in prison for firing a shot at her estranged husband during an argument will get a new trial, though she will not be able to invoke a "stand your ground" defense, an appeals court ruled Thursday.

The case of Marissa Alexander, a Jacksonville mother of three, has been used by critics of Florida's "stand your ground" law and mandatory minimum sentences to argue that the state's justice system is skewed against defendants who are black.

The 1st District Court of Appeal ruled that Alexander deserves a new trial because the trial judge handling her case did not properly instruct the jury regarding what is needed to prove self-defense.

The ruling, written by Judge Robert Benton, said the instructions constituted a "fundamental error" and required Alexander to prove self-defense "beyond a reasonable doubt."

But the court also made it clear in its ruling that the judge was right to block Alexander from using the state's "stand your ground" law as a way to defend her actions. That law generally removes people's duty to retreat in the face of possible danger and allows them to use of deadly force if they believe their lives are in danger.

Faith Gay, one of the attorneys representing the 33-year-old Alexander, said she was grateful for the "thorough consideration" provided by the appeals court.

"We are looking forward to taking the case back to trial," Gay said.

Alexander had never been arrested before she fired a bullet at a wall one day in 2010 to scare off her husband when she felt he was threatening her. Nobody was hurt, but the judge in the case said he was bound by state law to sentence her to 20 years in prison after she was convicted of aggravated assault with a deadly weapon. Alexander has maintained that the shot fired was a warning shot.

The sentencing sparked criticism from the local NAACP chapter and the district's African-American congresswoman, who said blacks more often are incarcerated for long periods because of overzealous prosecutors and judges bound by mandatory minimum sentences.

State Attorney Angela Corey, who oversaw the prosecution of George Zimmerman in the shooting death of Trayvon Martin, has stood by the handling of Alexander's case. Corey said she believes that Alexander aimed the gun at the man and his two sons, and that the bullet she fired could have ricocheted and hit any of them.

Jackelyn Barnard, a spokeswoman for Corey, said that the conviction was reversed on a legal technicality and that the office was gratified that the "stand your ground" ruling was upheld.

Benjamin Jealous, president and CEO of the NAACP, called the ruling a "welcome development in a case that represents the double standards in our justice system."

"From the streets to the courthouse, race continues to influence the judicial process, and it certainly seemed to have played a role here," Jealous said in a statement issued by the civil rights organization.

The state's "10-20-life" law was implemented in 1999 and credited with helping to lower the violent crime rate. Anyone who shows a gun in the commission of certain felonies gets an automatic 10 years in prison. Fire the gun, and it's an automatic 20 years. Shoot and wound someone, and it's 25 years to life.

On Aug. 1, 2010, Alexander was working for a payroll software company. She was estranged from her husband, Rico Gray, and had a restraining order against him, even though they'd had a baby together just nine days earlier. Thinking he was gone, she went to their former home to retrieve the rest of her clothes, family members said.

An argument ensued, and Alexander said she feared for her life when she went out to her vehicle to get the gun she legally owned. She came back inside and ended up firing a shot into the wall, which ricocheted into the ceiling.

Gray testified that he saw Alexander point the gun at him and looked away before she fired the shot. He claimed that she was the aggressor, and that he had begged her to put away the weapon.

The judge threw out Alexander's "stand your ground" self-defense claim, noting that she could have run out of the house to escape her husband but instead got the gun and went back inside. Alexander rejected a plea deal that would have resulted in a three-year prison sentence and chose to go to trial. A jury deliberated 12 minutes before convicting her.

Alexander was also charged with domestic battery four months after the shooting in another assault on Gray. She pleaded no contest and was sentenced to time served.

Supporters of Alexander have asked Gov. Rick Scott to pardon Alexander, but her case has not yet been taken by the state's clemency board.