Democrat Andy Beshear declared victory in Kentucky's gubernatorial race Tuesday night, and he did get more votes than incumbent Gov. Matt Bevin (R) — 5,189 more votes, according to the uncertified final tally, or a margin of about 0.4 percentage points.

But this doesn't appear to be the end of the process. Kentucky Secretary of State Alison Lundergan Grimes said her office considers Beshear the victor and doesn't believe Bevin can make up the gap. Yet Bevin refused to concede, citing unspecified "irregularities," and The Associated Press hasn't called the race.

Kentucky doesn't have an automatic recount provision, though candidates can petition — and bankroll — a statewide recount, Joe Sonka explains at the Louisville Courier Journal. First, losing candidates typically request a recanvas of the vote in each county. The recount is the next stage, and it involves a judge counting ballots and determining the winner, subject to appeal up to the Kentucky Supreme Court.

Republican Senate President Robert Stivers suggested a dicier option Tuesday night: Let the GOP state legislature decide the winner. Section 90 of the state Constitution says "contested elections for governor and lieutenant governor shall be determined by both houses of the General Assembly, according to such regulations as may be established by law." Stivers said his staff believes that might apply in this case. The last "contested" governors race was in 1899, the Courier Journal reports.

Sam Marcosson, a constitutional law professor at the University of Louisville, told the Courier Journal that Republicans can't just make up a legal procedure to review the election, and warned it's a risky "proposition to suggest that the General Assembly would take vague allegations of unspecified irregularities and call into question a gubernatorial election." Joshua Douglas, a professor at the University of Kentucky Law School, explained Bevin would have to call a special session of the General Assembly, then a panel of eight House members and three senators "would hear evidence and make a final determination. And that determination would be final."

The Kentucky Constitution stipulates that the next governor be sworn in Dec. 10. Peter Weber