WESTPORT — Democrats in Westport handed Hillary Clinton a big margin over Sen. Bernie Sanders that helped the former secretary of state claim a narrow statewide win over her rival in Tuesday’s presidential primary, while local Republicans were out of step with the landslide billionaire businessman Donald Trump scored across the state, instead backing Ohio Gov. John Kasich.

Clinton far outpaced Sanders in Westport, tallying 2,661 votes, or 70.29 percent of the total votes cast Tuesday by local Democrats, to 1,087 votes for Sanders, or 28.71 percent. The third candidate on the Democratic primary ballot, Roque “Rocky” De La Fuente, tallied only eight votes, while voters favoring “uncommitted” delegates to the Democratic National Convention cast 30 votes, or 0.79 percent.

The local Democratic primary results provided Clinton, a former New York senator who now calls nearby Westchester County her home, a more decisive victory than her statewide margin, where she edged the Vermont senator by about 17,000 votes — with 167,763 votes, or 52 percent, to his 152,895 votes, 47 percent.

In addition to her Connecticut victory, Clinton won three of the four other primaries Tuesday in Northeastern states — Pennsylvania, Maryland and Delaware — losing only Rhode Island to Sanders.

In the Republican contest, New Yorker Trump crushed his two remaining active rivals for the GOP presidential nomination in the statewide tally, amassing 58 percent, or 122,519 votes, with Kasich finishing a distant second with 28 percent, or 60,447 votes and Texas Sen. Ted Cruz winning 24,779, 12 percent. Physician Ben Carson, who remained on the ballot despite suspending his campaign, tallied 1,726, while 2,719 GOP voters cast their ballots for “uncommitted.”

Westport Republicans, however, bucked the statewide tide for Trump, with 46.19 percent, or 1,098 voters, favoring Kasich to 1,053 votes, or 44.3 percent, for Trump. Cruz won only 165 votes, 6.94 percent, while Carson got 11 votes, 0.46 percent. Uncommitted drew support from 50 Republican voters, 2.10 percent.