As the tally of votes in Kentucky’s race for governor drew to a close late Tuesday night, Democrat Andy Beshear held a lead of a few thousand votes over Republican incumbent Matthew Bevin out of more than 1.4 million votes counted.Beshear declared victory and Democrats celebrated, but AP decided the race was too close to call.Here’s why.Beshear’s lead of 5,150 votes is less than 0.4 percentage points. That’s inside the margin that would trigger a recount in most states, and it’s AP policy not to call races that could go to a recount. We want to avoid taking sides in a disputed election.There is no mandatory recount law in Kentucky. Bevin may request that counties recanvass their results, which is not a recount, but rather a check of the vote count to ensure the results were added up correctly. Bevin could also seek a recount in court, and on Tuesday night, he refused to concede.And so, AP decided to use the same standard we use in just about every other state: If the margin between the top two candidates is within 0.5 percentage points, we wait to make sure there won’t be a recount.At 10:02 p.m. ET, we sent the following APNewsAlert: "WASHINGTON (AP) — The race for governor in Kentucky between incumbent GOP Gov. Matt Bevin and Democrat Andy Beshear is too close to call."AP developed our standard on when to call — or not call — close races based on the history of recounts in the U.S. and a review of state election laws. The vast majority of states allow recounts if the margin between the top two candidates is 0.5 percentage points or less. Some recounts are mandatory; others can be requested — and paid for — by the trailing candidate.To be sure, recounts rarely change the outcome of a race. There have been 31 statewide recounts since the most famous one in Florida in 2000. Three of those contests were reversed by the recount. All three were decided by hundreds of votes, not thousands. The largest shift in the margin between the top two candidates was 0.1 percentage points.Kentucky counts almost all of its cast ballots on Election Day, too. It’s highly unlikely there are enough outstanding provisional ballots or overseas military ballots to push Bevin ahead. For Bevin to win, he’ll almost surely need officials to undercover a significant error in the vote tabulation.Still, in a race decided by such a slim margin, and with a recount possible, it’s a race that’s too close to call.