Democrat Dana Nessel is set to be Michigan's new attorney general after Republican Tom Leonard conceded Wednesday morning in a tight race.

With 99 percent of precincts reporting, Nessel led with 48.8% of the vote to Leonard's 46.5 percent, and Leonard conceded Wednesday morning. Official results were still pending.

“Last night’s results may be personally disappointing, but it is time to move forward and allow Michigan’s next attorney general to begin transitioning into this important role," Leonard said in a statement. "Dana Nessel ran a smart campaign and earned the voters’ trust."

Leonard wished Nessel well and offered to help her transition into the department. The two battled to succeed term-limited Republican Bill Schuette, who ran unsuccessfully for governor.

Republicans have held the Attorney General's Office for 16 years, first under Mike Cox and then Schuette. Democrats held the office for more than 40 years before that, with Jennifer Granholm succeeding Frank Kelley, who served 37 years before term limits were imposed.

The attorney general is Michigan's top law enforcement officer with statewide jurisdiction. In addition to handling violent crimes, the office oversees health care fraud, consumer protection and other crimes.

The office also serves as the state's lawyer, defending state departments in civil suits.

Nessel, 49, is a former assistant prosecutor in Wayne County who is best known for successfully litigating the case that led to gay marriage being legalized nationwide. Nessel represented two Michigan women, Jayne Rowse and April DeBoer, who were fighting for the right to marry and to legally adopt their children. The case went all the way to the U.S. Supreme Court, where their victory established a Constitutional right to marriage for same-sex couples.

Read more:

Whitmer defeats Schuette in governor's race

Legal marijuana in Mich.: What you need to know

Money, message and Trump: 6 lessons from midterms

Women make history: Over 100 projected to win seats in Congress

She told the Free Press she was partly motivated to run for attorney general based on pleadings she read in the gay marriage case. Schuette's office was defending a 2004 Michigan ballot initiative where voters defined marriage as between a man and a woman.

The pleadings included statements from experts claiming children raised by same-sex parents were likely to achieve less in school.

“I was distraught to read some of the arguments made on behalf of my state against my clients, but also against me and my children and my family,” Nessel said, referring to her wife, Alanna Maguire, and their twin sons.

Nessel also generated controversy with her campaign. Her first ad, which appeared only online, touted the fact that she may be better-positioned to fight cases of sexual harassment in the age of the #MeToo movement because she doesn’t have a penis.

Leonard, 37, of DeWitt is a former assistant prosecutor in Genesee County, who currently serves as speaker of the state House, where he has served the past six years. In the Legislature, Leonard helped pass bills cracking down on and increasing penalties for abusing vulnerable senior citizens and expanding access to outpatient mental health treatment, two of his top priorities.

"I would appoint a state integrity officer who would oversee the public integrity unit and hold government accountable at all levels," Leonard told the Free Press.

Contact John Wisely: 313-222-6825 or jwisely@freepress.com. On Twitter @jwisely. Free Press staff writer Kathleen Gray contributed to this report.