WASHINGTON -- President Donald Trump was a dominant force in the 2018 midterm elections as attitudes toward the polarizing leader influenced the decisions of nearly two-thirds of voters.

Thirty eight per cent of voters cast their ballots to express opposition to the president, according to AP VoteCast, a national survey of the electorate, while 26 per cent said they voted to express support for Trump.

While Trump was not on the ballot, his controversial administration animated voters on both sides of the aisle, with 2018 likely to set turnout records for a midterm election. Democrats have been activated in opposition to Trump since the moment of his election, while in recent weeks Trump has driven Republicans to the polls by trying to cast the race as a referendum on his administration.

The outcome of Tuesday's races was mixed: Democratic control of the House stands to alter the course of the Trump presidency, while Republican victories in key Senate and gubernatorial races pointed to the enduring strength of the Trump coalition.

The snapshot of who voted and why comes from VoteCast, a nationwide survey of more than 115,000 voters and about 22,000 nonvoters conducted for The Associated Press by NORC at the University of Chicago.

Heading into Election Day, Democrats pinned their hopes of retaking the House, and ultimately the White House, on women and minority voters, particularly in suburban districts. Republicans looked to retain their majorities by preserving support among the bloc of voters who propelled Trump to the White House in 2016.

There were reasons for both sides to be emboldened by Tuesday's results.

According to VoteCast, women voted considerably more in favour of their congressional Democratic candidate: About 6 in 10 voted for the Democrat, compared with 4 in 10 for the Republican. Men, by contrast, were more evenly divided in their vote.

Urbanites voted almost 2 to 1 in favour of Democrats, and small-town and rural voters cast votes for Republicans by a significant, but smaller margin.

In suburban areas, where key House races were being decided, voters skewed significantly toward Democrats by a nearly 10-point margin.

Non-white voters cast ballots for Democrats by a roughly 3-to-1 margin.

Democrats needed to gain a net of at least 23 seats in the House and two seats in the Senate to win majorities in the respective chambers. They were on track to secure the first, but it was Republicans who won the night for the statewide seats.

Ahead of the election, both parties claimed the emotionally charged debate over the confirmation of Supreme Court Justice Brett Kavanaugh would motivate their supporters to turn out. Kavanaugh faced multiple allegations of sexual misconduct from his youth that he denied.

According to VoteCast, half of voters said the tumultuous process was very important to their vote and they broke for the Democratic House candidate. Still, an overwhelming majority of voters in both parties said the Kavanaugh debate was at least somewhat important to their vote.

And in North Dakota, where Republicans picked up a seat that helped them hold onto control of the Senate, voters concerned about Kavanaugh broke strongly toward the GOP.

Both parties' closing messages appeared to have animated their respective bases, according to VoteCast, with health care and immigration each described as the most important issues in the election by about 25 per cent of voters. Of those who listed health care as the most important issue facing the nation, about 3 in 4 voted for the Democratic candidate. About the same percentage of voters who described immigration as the most important issue cast ballots for the Republican.

Opposition to Trump proved to be more a motivating factor for Democrats than support for the president a factor for Republicans. Still, Republican voters tended to be overwhelmingly supportive of the president.

More voters disapproved of Trump's job performance than approved -- a finding that is largely consistent with recent polling.

Voters scored Trump positively on the economy and for standing up "for what he believes in." But the president received negative marks from voters on temperament and trustworthiness.

Still, about one-third of voters said Trump was not a factor in their votes.

With the final days of the 2018 campaign interrupted by a spate of politically motivated attempted bombings and a massacre at a synagogue in Pittsburgh, about 2 in 10 Democratic and Republican voters think their own party's way of talking about politics is leading to an increase in violence.

VoteCast debuted Tuesday, replacing the in-person exit poll as a source of detailed information about the American electorate. Developed with NORC at the University of Chicago, it combines a random sample survey of registered voters and a massive poll conducted via opt-in online panels. The resulting research has the accuracy of random sampling and the depth provided by an online poll that interviews tens of thousands.

VoteCast results cannot be reliably compared to the results of previous exit polls, as the two surveys use different methodologies to poll the electorate. Differences between the two may be the result of differences in survey methods, rather than real changes in opinions or makeup of the electorate over time.

------

AP VoteCast is a survey of the American electorate conducted in all 50 states by NORC at the University of Chicago for The Associated Press and Fox News. The survey of 115,936 voters and 22,016 nonvoters was conducted Oct. 29 to Nov. 6, concluding as polls close on Election Day. It combines interviews in English and Spanish with a random sample of registered voters drawn from state voter files; with self-identified registered voters conducted using NORC's probability-based AmeriSpeak panel, which is designed to be representative of the U.S. population; and with self-identified registered voters selected from nonprobability online panels. Participants selected from state voter files were contacted by phone and mail, and had the opportunity to take the survey by phone or online. The margin of sampling error for voters is estimated to be plus or minus 0.5 percentage points. All surveys are subject to multiple sources of error, including sampling, question wording and order, and nonresponse. Find more details about AP VoteCast's methodology at http://www.ap.org/votecast.