TALLAHASSEE, Fla., Nov 6 (Reuters) - Democrat Andrew Gillum lost his bid to become Florida's first black governor on Tuesday, suffering a razor-thin defeat to Republican Ron DeSantis in a contest that drew national attention and allegations of race-baiting."I want to encourage you not to give up," Gillum, the 39-year-old mayor of Tallahassee, told supporters in conceding the race. "I still plan to be on the front lines alongside every one of you when it comes to standing up and fighting for what we believe in."Republicans also scored a major victory in Ohio, where Mike DeWine, the state attorney general, defeated Democrat Richard Cordray, who served as the first director of the U.S. Consumer Financial Protection Bureau.The losses tempered big Democratic victories in governor races in Michigan and Kansas, states that voted for Republican President Donald Trump in 2016.While much of the elections' focus was on which party would win control of the U.S. Congress, Republicans and Democrats were battling across the country for state-level power, including in three dozen governors' races.In Michigan, Democrat Gretchen Whitmer turned back Republican Bill Schuette in the contest to replace Republican Governor Rick Snyder, who could not run again due to term limits. In Kansas, Democrat Laura Kelly defeated Kris Kobach, a staunch Trump ally, where outgoing Republican Governor Sam Brownback suffered from low approval ratings.In Georgia, Democrat Stacey Abrams, 44, was vying to become the nation's first black female governor against Republican Brian Kemp, the state's secretary of state. That contest was still unresolved by 11 p.m. EST (0400 GMT).The races in Florida and Georgia were seen as a test of whether liberal candidates could prevail in Southern states, where centrist Democrats have repeatedly lost, by appealing to a coalition of young and minority voters.Both DeSantis and Kemp had strong support from Trump, who traveled to their states in the closing days of the campaigns to energize Republicans at "Make America Great Again" rallies. Democratic former President Barack Obama swooped in to boost the Democrats, and media star Oprah Winfrey visited Georgia on behalf of Abrams.Accusations of race-baiting have dogged Kemp, 55, and DeSantis, 40. They deny the charges."We all learned in 2016 not to count on anything, not polls, not election integrity, not the electoral mood," Dawn Hucklebridge, 36, a friend of Gillum, said at his election night gathering as it became clear he would likely lose. "I'm pretty disappointed."STATE-LEVEL POWERWinning state-level power would help Republicans and Democrats support or resist Trump's agenda on issues such as healthcare, gun control and gay rights.Democrats, playing catch-up after a net loss of 13 governorships and more than 900 state legislative seats during the eight-year Obama administration, fielded their largest slate of legislative candidates in more than three decades.Republicans controlled 33 governors' mansions and two-thirds of state legislative chambers going into Tuesday.The outcome of elections for state positions could also affect future control of the U.S. House of Representatives.Governors and hundreds of legislators elected this year will be in office when congressional districts are redrawn after the 2020 Census. In some states, a governor's power to sign or veto congressional maps could decide the partisan balance.Democrats viewed the governor's race in Wisconsin, where Republican Scott Walker was seeking a third term, as winnable. Michigan, Wisconsin and Pennsylvania - where Democratic incumbent Tom Wolf easily won re-election on Tuesday - are typically Democratic states that swung to Trump in 2016, handing him the presidency.In Oklahoma, Republican Kevin Stitt defeated Democrat Drew Edmondson, dashing Democratic hopes that outgoing Republican Governor Mary Fallin's low approval numbers had provided a rare opportunity in a deeply conservative state.Republicans, meanwhile, were eyeing potential pickups in Connecticut and Oregon, both traditionally Democratic states.In Colorado, Democrat Jared Polis was set to become the first openly gay man to be elected governor of a U.S. state, after NBC News projected him to win against Republican Walker Stapleton.In Georgia, critics have drawn attention to Kemp's dual role as a candidate for governor and as supervisor of the state's elections in his capacity as secretary of state. Kemp accused Democrats on Sunday of trying to hack voter registration systems, without offering any supporting evidence. Democratic Party officials, who have accused Kemp of trying to suppress the minority vote, quickly denied the charge.A nonprofit group, Protect Democracy, said it had filed an emergency lawsuit on Tuesday asking a federal judge to block Kemp from presiding over the election results, including any recount or runoff race.Under Georgia law, if neither Abrams nor Kemp wins a majority of the vote on Tuesday, their battle continues to a December runoff. The presence of a third-party candidate on the ballot makes that possibility more likely.