Voters cast their ballots among an array of electronic voting machines in a polling station at the Noor Islamic Cultural Center, Tuesday, Aug. 7, 2018, in Dublin, Ohio. Two-term state Sen. Troy Balderson,... (Associated Press) 
 
 Voters cast their ballots among an array of electronic voting machines in a polling station at the Noor Islamic Cultural Center, Tuesday, Aug. 7, 2018, in Dublin, Ohio. Two-term state Sen. Troy Balderson, is fighting off a strong challenge from Democrat Danny O'Connor, a 31-year-old county official,... (Associated Press) 
 
 WESTERVILLE, Ohio (AP) — Two high-stakes elections that tested President Donald Trump's clout and cost both parties millions of dollars were too close to call early Wednesday. Trump claimed victory in one nevertheless. 
 
 In battleground Ohio, the president took credit for Republican Troy Balderson's performance, calling it "a great victory," even though the contest could be headed to a recount. Democrats could also celebrate their showing in a district that has gone Republican for decades. 
 
 "We're not stopping now," Democrat Danny O'Connor told cheering supporters. He'll reprise his campaign against Balderson from now through November's general election. 
 
 In deep-red Kansas ' Republican gubernatorial primary, the candidate Trump backed on the eve of the election, Secretary of State Kris Kobach, was neck and neck with current Republican Gov. Jeff Colyer. 
 
 The day's races in five states, like many before them, tested the persistence of Trump's fiery supporters and the momentum of the Democratic Party's anti-Trump resistance. 
 
 The results were helping determine the political landscape — and Trump's standing within his own party — as the GOP defends its House and Senate majorities this fall. 
 
 In Kansas, Republicans were fighting among themselves in an unusual battle for governor in which the president sided with the incumbent's challenger. 
 
 Should the polarizing Kobach win the primary, some Republican operatives fear he could lose the governorship to Democrats this fall. The race could become further disrupted if Kansas City-area businessman Greg Orman makes it onto the November ballot. He submitted petitions Monday with more than 10,000 signatures for what could become the most serious independent run for Kansas governor in decades. 
 
 Trump made his preference clear for Kobach. 
 
 "He is a fantastic guy who loves his State and our Country - he will be a GREAT Governor and has my full & total Endorsement! Strong on Crime, Border & Military," the president tweeted on the eve of the election. 
 
 Republicans were hoping for Democratic discord in Kansas' 3rd Congressional District, a suburban Kansas City district where several candidates were fighting for the chance to take on Republican Rep. Kevin Yoder in November. 
 
 The five-way Democratic primary featured labor lawyer Brent Welder, who campaigned recently with self-described democratic socialists Vermont Sen. Bernie Sanders and ascending political star, Alexandria Ocasio-Cortez, a New York congressional candidate. 
 
 Also in the race: Native American attorney Sharice Davids and former school teacher Tom Niermann. 
 
 In Ohio, the script for the special election was somewhat familiar: An experienced Trump loyalist, Balderson, was fighting a strong challenge from O'Connor, a fresh-faced Democrat, in a congressional district held by the Republican Party for more than three decades. As voters were going to the polls, Trump said Balderson would make a "great congressman." 
 
 The winner takes the seat previously held by Pat Tiberi, a nine-term incumbent who resigned to take a job with an Ohio business group. 
 
 Balderson and O'Connor will reprise their race in the general election in just three months. There were at least 3,367 provisional ballots left to be reviewed. That's enough for O'Connor to potentially pick up enough to force a recount. 
 
 The Associated Press does not declare winners in races subject to an automatic recount. 
 
 In a special election season that featured nearly a dozen congressional contests, Democrats claimed just a handful of wins, but they may have cause for optimism this fall. In virtually every special election test dating back to the spring of 2017, Democratic candidates performed significantly better than their party in those same places two years earlier. 
 
 Trump won Ohio's 12th Congressional District, for example, by more than 11 points in 2016; on Tuesday night, Balderson and O'Connor were separated by less than 1 point. 
 
 There are 79 House races this fall considered more competitive than the Ohio district — at least looking at Trump's 2016 performance — according to data compiled by the Democrats' national campaign committee. 
 
 Despite the deadlocked race, the specific Ohio returns suggest considerably higher Democratic enthusiasm less than 100 days before the midterms. 
 
 O'Connor's total of nearly 100,000 votes far exceeded what the district's former Republican congressman Pat Tiberi's Democratic opponent got in 2014. Balderson's total — just more than 101,500 votes — is barely two-thirds of Tiberi's 2014 mark of about 150,000. 
 
 The two will face off again in November to see who holds the seat in 2019 and 2020. 
 
 "Over the next three months, I'm going to do everything I can to keep America great again, so that when we come back here in November — get ready, we gotta come back here in November — I have earned your vote for a second time," Balderson told supporters. 
 
 It's unclear how much Trump's support helped or hurt Balderson. Described by campaign operatives as a "Whole Foods" district, the largely suburban region features a more affluent and educated voter base than the typical Trump stronghold. 
 
 Ohio Gov. John Kasich, a leading voice in the GOP's shrinking anti-Trump wing, once represented the district in Congress. 
 
 At times, the race centered on Trump's tax cuts as much as the candidates. 
 
 O'Connor and his Democratic allies railed against the tax plan, casting it as a giveaway for the rich that exacerbates federal deficits and threatens Medicare and Social Security. Balderson and his Republican allies have backed away from the tax plan in recent weeks, training their fire instead on top House Democrat Nancy Pelosi. 
 
 O'Connor dominated Balderson on the local airwaves. His campaign spent $2.25 million on advertising compared to Balderson's $507,000, according to campaign tallies of ad spending. The Republican campaign arm and its allied super PAC were forced to pick up the slack, spending more than $4 million between them. 
 
 In Michigan , three mainstream Democrats in suburban Detroit were among those vying for a chance at retiring Republican Rep. Dave Trott's seat in November. The field included Fayrouz Saad, who would be the first Muslim woman in Congress. 
 
 And in suburban Seattle, three Democrats vied in a jungle primary for the seat held by another retiring Republican, Rep. Dave Reichert. 
 
 The field was set in two Senate contests as well. 
 
 In Missouri, Democratic Sen. Claire McCaskill claimed her party's nomination, while state Attorney General Josh Hawley will represent the GOP. 
 
 And in Michigan, Democratic Sen. Debbie Stabenow will take on military veteran and business executive John James, who won the Republican nomination. He would join Tim Scott of South Carolina as the only black Republican senators if he wins in November. 
 
 Hours before polls opened, Trump again weighed in on Twitter, casting James as "a potential Republican star." 
 
 ___ 
 
 Peoples reported from Washington. Associated Press writers John Hanna in Topeka, Kansas, and Angie Wang in Westerville, Ohio, contributed. 
 
 ___ 
 
 Sign up for "Politics in Focus," a weekly newsletter showcasing the AP's best political reporting from around the country leading up to the midterm elections: https://bit.ly/2ICEr3D ||||| Kansas GovernotJeff Colyer advance votes on Tuesday, July 31, 2018. at Hilltop Learning Center in Overland Park, Kansas. (John Sleezer/The Kansas City Star via AP) (Associated Press) 
 
 Kansas GovernotJeff Colyer advance votes on Tuesday, July 31, 2018. at Hilltop Learning Center in Overland Park, Kansas. (John Sleezer/The Kansas City Star via AP) (Associated Press) 
 
 WESTERVILLE, Ohio (AP) — President Donald Trump's preferred congressional candidate — and his chief legislative achievement — are about to be tested in battleground Ohio in the season's final high-stakes special election. 
 
 The midsummer affair comes as Trump's shadow looms over primary contests in four other states on Tuesday, none bigger than Kansas, where the Republican president roiled the governor's race Monday by opposing the sitting GOP governor on the eve of the election. 
 
 The races, like dozens before them, pit the strength of the Republican president's fiery coalition against the Democratic Party's anti-Trump resistance. The results will help determine the political landscape — and Trump's standing within his own party — just three months before the GOP defends its House and Senate majorities across the nation. 
 
 Voters in Ohio and Kansas join those across Missouri, Michigan and Washington state at the ballot box. But only Ohio will send someone to Congress after the votes are counted. 
 
 The script for Ohio's special election is perhaps familiar: An experienced Trump loyalist, two-term state Sen. Troy Balderson, is fighting off a strong challenge from a fresh-faced Democrat, 31-year-old county official Danny O'Connor, in a congressional district held by the Republican Party for more than three decades. In an early, election morning tweet, Trump said Balderson would make a "great congressman." 
 
 The winner will fill the seat previously held by Pat Tiberi, a nine-term Republican incumbent who resigned to take a job with an Ohio business group. 
 
 Trump himself campaigned at Balderson's side just 72 hours before Election Day, a weekend appearance to help energize his loyalists in a district the president carried by 11 percentage points. 
 
 But there was little evidence of enthusiasm on the eve of the election as Balderson tried to connect with voters over the phone during a brief stop at a campaign phone bank. He appeared equally uncomfortable answering questions from reporters about whether Trump's appearance might blunt the impact of the recent endorsement from a prominent Trump adversary, Republican Gov. John Kasich. 
 
 Balderson said simply that it was an honor and "incredible" to appear with and be supported by the president. He called the race "very close." 
 
 "It's going to be tough, but we feel very positive, we feel very good with the amount of volunteers that we've had here, the enthusiasm, the amount of hours that we've put in," Balderson said. 
 
 It's unclear, however, whether Trump's support helps or hurts his preferred candidate. Described by campaign operatives as a "Whole Foods" district, the largely suburban region features a far more affluent and educated voter base than the typical Trump stronghold. 
 
 Kasich, a leading voice in the GOP's shrinking anti-Trump wing, previously represented the district in Congress. 
 
 The race has centered on Trump's tax cuts at times as much as the candidates themselves. 
 
 O'Connor and his Democratic allies have railed against the tax plan, casting it as a giveaway for the rich that exacerbates federal deficits and threatens Medicare and Social Security. Balderson and his Republican allies have backed away from the tax plan in recent weeks, training their fire instead on top House Democrat Nancy Pelosi. 
 
 O'Connor has dominated Balderson on the local airwaves. His campaign spent $2.25 million on advertising compared to Balderson's $507,000, according to campaign tallies of ad spending. The Republican campaign arm and its allied super PAC was forced to pick up the slack, spending more than $4 million between them. 
 
 During a lively event in a Democrat-heavy Columbus neighborhood Monday, O'Connor urged volunteer canvassers to think about what's at stake for working people, including access to affordable health care. 
 
 "They do everything right and, right now in Washington, D.C., no one has their back," he said. "That's about to change in 28 hours, because we are sprinting. We are sprinting through the finish line for this race. We are working so hard because we are part of a movement, we are part of a grassroots movement that is going to change the way politics works." 
 
 Meanwhile, more than 700 miles to the west, Kansas Republicans were fighting among themselves in the escalating battle for governor, where Secretary of State Kris Kobach was trying to unseat Gov. Jeff Colyer. 
 
 Should the polarizing Kobach win, some Republican operatives fear he could lose the governor's seat to Democrats this fall. The race could become further disrupted if Kansas City-area businessman Greg Orman makes it onto the November ballot. He submitted petitions Monday with more than 10,000 signatures for what could become the most serious independent run for Kansas governor in decades. 
 
 Trump didn't seem worried about Kobach's prospects. 
 
 "He is a fantastic guy who loves his State and our Country - he will be a GREAT Governor and has my full & total Endorsement! Strong on Crime, Border & Military," the president tweeted on the eve of the election. "VOTE TUESDAY!" 
 
 Republicans are hoping for Democratic discord in Kansas' 3rd Congressional District, a suburban Kansas City region where several candidates are fighting for the chance to take on Republican Rep. Kevin Yoder in November. 
 
 The five-way Democratic primary features labor lawyer Brent Welder, who campaigned recently with self-described democratic socialists Vermont Sen. Bernie Sanders and ascending political star, Alexandria Ocasio-Cortez, a New York congressional candidate. 
 
 Also in the race: Native American attorney Sharice Davids and former school teacher Tom Niermann. 
 
 Voters in suburban Detroit will also weigh in on the direction of the Democratic Party. Three mainstream Democrats are viewed as leaders to vie for retiring Republican Rep. Dave Trott's seat in November. The field includes Fayrouz Saad, who would be the first Muslim woman in Congress. 
 
 And in suburban Seattle, three Democrats are vying in a jungle primary for the seat held by another retiring Republican, Rep. Dave Reichert. 
 
 Senate contests in Missouri and Michigan will come into focus as two vulnerable Senate Democrats, Missouri's Claire McCaskill and Minnesota's Debbie Stabenow, are expected to easily claim their party's nominations. 
 
 Missouri Attorney General Josh Hawley is expected to take on McCaskill. In Michigan, military veteran and business executive John James is vying for the chance to knock off Stabenow. He'd join Sen. Tim Scott as the only black Republican senators if he did. 
 
 Hours before polls opened, Trump again weighed in on Twitter, casting James as "a potential Republican star." 
 
 ___ 
 
 Peoples reported from New York. Associated Press writer John Hanna in Topeka, Kansas, contributed to this report. 
 
 ___ 
 
 This story has been corrected to reflect Hawley's title to state attorney general instead of secretary of state.
– Voters in five states go to the polls on Tuesday, and analysts will again be looking for clues on what the results might mean for the November midterms. Some highlights: Kansas: The GOP primary for the governor's seat might be the highest-profile contest of the night because of President Trump. On Monday, Trump backed conservative Secretary of State Kris Kobach over the sitting Republican incumbent, Jeff Colyer, notes the AP. One fear for Republicans is that if Kobach wins, he'd be vulnerable to Democrats in November. Ohio: This is a special election, not a primary, to fill the seat of retired GOP Rep. Pat Tiberi. The seat has long been held by Republicans, but Democrat Danny O'Connor is in a surprisingly close race against the GOP's Troy Balderson. A GOP loss would be a "psychological blow" to the party, per CNN, but no matter what happens, the two candidates will be squaring off again in November. Trump tweeted on behalf of Balderson on Tuesday. Michigan: An open governor's seat is at stake, and if Abdul El-Sayed wins the Democratic primary and again in November, he would become the nation's first Muslim governor. Bernie Sanders is a big supporter, notes CNN. Elsewhere, Fayrouz Saad is one of the Democrats vying for the seat of retiring Rep. Dave Trott, and she has the chance to become the first Muslim woman in Congress, per the AP. Missouri: The Senate race here is getting big attention, because it's seen as one of the GOP's best chances to unseat a Democratic incumbent, in this case Claire McCaskill. State Attorney General Josh Hawley is expected to win the GOP nomination Tuesday night. Washington state: Various congressional primaries are on the ballot, and one interesting facet is that Washington uses what the AP calls a "jungle primary" system in which all candidates regardless of party are listed on the same ballot. The top two advance. One big race is for the seat of retiring GOP Rep. Dave Reichert near Seattle.