On Long Island, Republican Donald Trump defeated Democrat Hillary Clinton in the presidential election by just under 20,000 votes, according to unofficial results.

In Suffolk, Trump won 52.13 percent of the total vote, or 328,403 votes, compared to Clinton’s 43.96 percent, or 276,953 votes.

advertisement | advertise on newsday

In Nassau County, Clinton won 50.88 percent of the vote, or 307,326 votes, compared to 45.61 percent, or 275,479 votes, for Trump.

Overall, of the combined 1.2 million ballots cast on Long Island, Trump garnered slightly more total votes than Clinton, 603,882 to 584,279 — a margin of less than 20,000 votes between the two top candidates.

On Long Island, the remaining votes were shared by Libertarian candidate Gary Johnson and Green Party candidate Jill Stein, each with about 1 percent of the popular vote in both Nassau and Suffolk, results show.