Melissa Nelson, an unknown corporate lawyer and former prosecutor three months ago, cleared her path to become one of the most powerful and influential figures in Northeast Florida on Tuesday night when she easily defeated incumbent 4th Judicial State Attorney Angela Corey.

The election caps a dizzying rise for Nelson and an equally shocking fall for Corey, one of the most polarizing political figures in Jacksonville history who generated national attention and enormous criticism for her prosecutions of George Zimmerman, Marissa Alexander, 12-year-old Cristian Fernandez and many others. Corey will depart office in the first week of January as the first incumbent state attorney in modern history to lose a contested election.

Nelson must still defeat write-in candidate Kenny Leigh in the general election before she officially becomes the state-attorney elect, but no write-in candidate has ever been elected to a state attorney position in Florida and Leigh has not raised any money or made any campaign appearances.

Until Nelson entered the race Corey was largely seen as a lock to win a third term despite numerous controversies and low public approval ratings. But Nelson hit the ground running, raising over $1 million and getting support from many in the legal and business community.

Corey attempted to counter by hyping the support she had received from elected officials like Jacksonville Mayor Lenny Curry, Sheriff Mike Williams and other current and former elected officials. Williams and other law enforcement officers touted Corey, her experience and toughness in ads supporting her. But that support never seemed to convince voters they wanted to keep Corey.

The first poll that came out after Nelson entered the race showed her with a 10-point lead. That expanded to a massive 32-point lead in a poll that was released last week.

Nelson campaigned on a platform of bringing integrity to the office and said Corey had lost the trust of the community with her actions.

Throughout the campaign Corey touted her decades of experience as a high-profile prosecutor. Before being elected state attorney Corey had worked for former 4th Judicial Circuit state attorneys Ed Austin and Harry Shorstein and also worked for former 7th Circuit State Attorney John Tanner.

Controversy had followed Corey even before she was elected as Duval, Clay and Nassau's top prosecutor. She had engaged in a long-running feud with Shorstein, her predecessor and former boss that rose up again this year when Corey unsuccessfully tried to tie Nelson to Shorstein, blaming both for dropping the death penalty against convicted murderer William Wells, who would later kill again in prison.

Once in office Corey engaged in multiple feuds, refusing to speak to this newspaper for a year, and often lashed out at criticism of her.

And that criticism became more vocal when she chose to prosecute Zimmerman for the second-degree murder of Trayvon Martin, sought a 60-year prison sentence for Alexander after she fired a shot in the direction of her abusive husband and decided to try Fernandez as an adult.

Each case generated international attention, with many saying Corey overcharged or sought excessive sentences.

And the criticism came from across the political spectrum, with top conservatives criticizing her for her unsuccessful prosecution of Zimmerman, civil rights and women's rights activists attacking her for Alexander and juvenile rights activists criticizing Corey for her actions with Fernandez and blasting her propensity to charge juveniles in adult court.

Nelson took advantage, assembling a coalition that included liberal trial lawyers, moderate chamber of commerce Republicans and conservative gun rights activists. Early on in the campaign, the National Rifle Association endorsed Nelson, giving her credibility with conservative gun rights supporters who previously backed Corey but were unhappy with her prosecutions of Zimmerman and Alexander.

Nelson, who grew up in Tallahassee, graduated from the University of Florida law school and spent 12 years working for the 4th Judicial Circuit State Attorney under Shorstein and Corey. She resigned 10 months after Corey took office in 2009 to take a job with the international law firm McGuireWoods.

While in private practice Nelson was one of the lawyers who defended Fernandez. She also defended Florida State University when the woman who claimed former Seminoles quarterback Jameis Winston raped her sued the school.

The new state attorney will take office the first week of January.

Staff writer Dan Scanlan contributed to this report.

larry.hannan@jacksonville.com, (904) 359-4470

sebastian.kitchen@jacksonville.com, (904) 359-4161