Hillary Clinton’s resume, her position on gun policy, her support from women and New York Democrats’ racial and ethnic diversity all boosted her to victory in the state’s presidential primary, while Donald Trump’s home-state advantage gave him record margins overall and across a range of Republican voter groups.

Yet challenges remain for both. Clinton won the state despite continued comparatively weak ratings for honesty, and she lost a variety of key groups to Bernie Sanders, including white men, young voters, strong liberals and those especially worried about the economy, perceived Wall Street excesses and free trade.

Trump, for his part, continued to do poorly among voters focused on a candidate who shares their values. And underscoring the party’s deep rifts, a remarkable 57 percent of his opponents’ backers said they wouldn’t support him as their party’s nominee in November.

Indeed, reflecting a foul mood within the GOP electorate, nearly six in 10 Republican primary voters said the 2016 campaign has done more to divide than to energize the party. That was in a sharp contrast to the Democratic race, in which two-thirds said the contest has done more to energize their side, and many fewer voters ruled out either Clinton or Sanders for their November vote.

New York exit poll results were analyzed for ABC News by Langer Research Associates. Our summary of key results in each race follows.

The Democratic Contest

Among other factors, a sense of inevitability helped Clinton: Seventy-two percent of Democratic primary voters said they thought she’ll be the ultimate nominee. Two-thirds, moreover, gave her a better chance than Sanders to beat Trump in November. And Clinton even ran slightly ahead of Sanders as being the more inspirational candidate, an attribute on which Sanders prevailed easily in his Wisconsin win.

New York was more hospitable to Clinton in a range of ways. Its closed primary limited the number of political independents participating in the Democratic primary – just 14 percent, vs. 27 percent in Wisconsin and nearly as many in previous contests on average. Sanders again won independents overwhelmingly, with three-quarters of their votes.

Racial and ethnic minorities accounted for four in 10 voters in the state, vs. fewer than two in 10 in Wisconsin. Clinton won three-quarters of black voters and 63 percent of Hispanics, while whites divided 51-49 percent, Sanders-Clinton.

Clinton had a broad 22-point margin among women, typical for her in primaries to date, while Sanders again won white men, by a substantial 16 percentage points. Sanders also won by 2-1 among voters younger than 30, slightly off his average across primaries this year.

While more than eight in 10 called Sanders honest and trustworthy, far fewer, 60 percent, said the same of Clinton – similar to previous contests to date, meaning no better for Clinton even in her home state. In further dent to her image, nearly half said she ran the “more unfair” campaign; just a third said, instead, that Sanders did.

Voters picked Clinton over Sanders to handle gun policy by a wide margin, 22 points, and also favored her, by 18 points, as better suited to be commander in chief. But Sanders scored on his trademark issues: Nearly two-thirds said Wall Street hurts the U.S. economy, and he won them by a dozen points. And nearly half of voters said they were very worried about the economy’s future, more than in most other states; Sanders won them by 10 points.

Mirroring results in other Northern states, Clinton’s margin among nonwhites overall was attenuated by her lower support among young nonwhites. She won 80 percent of nonwhites age 45 and older, while splitting those younger than 45 about evenly with Sanders.

In the end, as with previous primaries, the battle came down to a decision between a candidate who “cares about people like me” or is “honest and trustworthy – both strong Sanders groups – or who has the right experience or the best chance of winning in November. In those two groups combined, nearly nine in 10 backed Clinton, enough for her double-digit margin of victory overall.

The Republican Contest

Record levels of demand for an outsider, a straight-talker and a change agent lifted Donald Trump to an easy primary victory. In by far his biggest win to date, Trump benefited from a sense among most New York Republican primary voters that he’s got the best chance to beat Clinton were she the Democratic nominee in November – and from a record number of early deciders in GOP primaries to date, another sign of his home-state advantage.

Ted Cruz failed to consolidate the anti-Trump vote, as he did in Wisconsin; indeed even strong conservatives and evangelicals, while fewer in number, both backed Trump. Instead a greater mix of moderate and even liberal GOP voters helped John Kasich to one of his best nights.

Even with Trump’s easy win, the exit poll results marked the continuing splits within the Republican Party. As noted, nearly six in 10 GOP primary voters said the 2016 campaign has done more to divide the party than to energize it. Proving the point, two-thirds of Kasich supporters said they would not vote for Trump in November if he’s the party’s nominee, the most to date in primaries where the question has been asked. Forty-two percent of Cruz voters said the same.

Among key results explaining Trump’s win:

• Sixty-four percent of GOP voters said they were looking for an outsider, a new high. Trump won these outsider voters even more overwhelmingly than usual, with 85 percent of their votes, compared with 65 percent across previous contests to date. It was both record Trump support, as well as record turnout, in this voting group.

• Six in 10 GOP voters said they were chiefly looking either for a candidate who “can bring needed change” or “tells it like it is” – again a record high, up from 50 percent on average in previous primaries. Trump won 72 percent of “change” voters and nine in 10 of those who prized a plain-talker, both new highs.

• More than half of voters said they decided on their choice more than a month ago, and three-quarters of them backed Trump – a record number of early deciders and his best result among them.

• Trump, who as usual did especially well with less-educated voters, won two-thirds of those who lack a college degree, his highest support in this group to date.

• That said, even in this victory Trump again lost voters looking chiefly for a candidate who shares their values, with just 24 percent support in this group, third to Kasich – who beat Trump nearly by 2-1 among these values-focused voters – and Cruz alike.

Even as he won, Trump again encountered majority opposition to one of his signature issues, deporting undocumented immigrants, with 39 percent in support of the idea, about the average across previous primaries. That said, 68 percent favored his proposal to temporarily bar Muslims from entering the United States, matching its average this year. Trump won 72 percent in each of those groups, again both new highs.

Cruz, coming off a big win in Wisconsin, encountered stiff headwinds here. Trump beat him even among very conservative voters, by a whopping 62-26 percent – a group Cruz has won on average by 42-34 percent previously, and by 65-28 percent in Wisconsin. And while evangelicals have divided by 36-34 percent between Trump and Cruz on average, Cruz won a mere 21 percent of this group in New York (finishing third; Kasich won 29 percent of evangelicals.)

Further, while Cruz won 42 percent of values-focused voters in previous contests, just 30 percent of them supported him in New York – possibly a rebuke to his negative comment on “New York values” back in January.