Conservative Brian Hagedorn declared victory in Wisconsin’s Supreme Court race.

Hagedorn led fellow appeals court Judge Lisa Neubauer 50.2 percent to 49.8 percent as of Wednesday morning. The results will not become official until a canvass of the votes. The Associated Press had not declared a victor, and both sides were digging in for the possibility of a recount and had made fundraising appeals.

If the vote holds, the conservative majority on the court will expand from 4-3 to 5-2, and liberals will be unable to seize back control in 2020.

An evangelical Christian and former chief legal counsel to Republican Gov. Scott Walker, Hagedorn, 61, spent much of the closely watched race defending his conservative beliefs. Neubauer lambasted him for a blog post he wrote in law school in which he described Planned Parenthood as a "wicked organization" that was more devoted "to killing babies than to helping women."

Hagedorn also wrote that a landmark gay rights ruling by the U.S. Supreme Court striking down a Texas anti-sodomy law could lead to the legalization of bestiality. "The idea that homosexual behavior is different than bestiality as a Constitutional matter is unjustifiable," he wrote in 2005. “There is no right in our Constitution to have sex with whoever or whatever you want in the privacy of your own home (or barn).”

Those views led the Chamber of Commerce and the Wisconsin Realtors Association, which usually back Republicans, to stay out of his race. The Realtors rescinded their endorsement and asked Hagedorn to return their $18,000 contribution. But he maintained strong endorsements from the National Rifle Association and Wisconsin Right to Life.

"We made history," Hagedorn said in a press conference. "We made history in a significant way, and our margin of victory looks to be insurmountable."

Neubauer led by wide margins in Democratic-held congressional districts that include Milwaukee and Madison, but Hagedorn, who has been on the Wisconsin Court of Appeals since 2015, carried the majority in more rural parts of the state.

Neubauer, also 61, was appointed to the appeals court in 2007 by Democratic Gov. Jim Doyle. Neubauer was elected to the appeals court in 2008, re-elected in 2014, and has been chief judge since 2015.