New York City voters are split on whether Mayor Bill de Blasio should challenge or cooperate with President-elect Donald Trump, according to opinion poll released Thursday.

The Quinnipiac University survey found that 46 percent of those questioned believe that de Blasio ought to attempt a detente with Trump, with 45 percent favoring de Blasio fighting against Trump’s promised policies.

De Blasio, a Democrat, supported Hillary Clinton during the campaign, and has come out against the real estate mogul’s promises, such as rounding up and deporting people in the country illegally, creating a Muslim registry, and rejuvenating and nationalizing a police policy of stop, question and frisk.

Trump, a Republican, takes the oath of office Friday at noon. De Blasio has promised cooperation on policies like infrastructure where there is common ground. On Thursday night, de Blasio spoke at an anti-Trump “We Stand United Rally” outside the Trump International Hotel and Tower near Columbus Circle.

De Blasio spokesman Eric Phillips dismissed the poll’s relevance.

“This is the kind of false choice that only exists in pollster conference rooms. There will be times when the mayor aggressively challenges the incoming president, and I suspect there will be times when their interests align and they work together on an issue. The mayor has both speeds — and he’ll undoubtedly need them,” Phillips said.

The poll breaks down along racial and partisan lines, with 90 percent of Republicans favoring de Blasio getting along with Trump to 4 percent favoring opposing him; 60 percent of Democrats favoring opposition to 33 getting along; whites, 45 to 48, blacks 51 to 39, and Hispanics 40 to 51. The divide was most stark between Manhattan, where 57 want de Blasio to oppose Trump and 36 want cooperation, and Staten Island, where 16 percent want opposition and 67 want cooperation.

The results are within the margin of sampling error, plus or minus 3.1 percentage points. The survey, conducted from Jan. 11 to 17, surveyed 1,005 New York City voters on landlines and cellphones.

The same poll found that Gov. Andrew M. Cuomo — de Blasio’s foe — would be a better advocate for New York under Trump.

advertisement | advertise on newsday

The Trump-de Blasio poll was the second half of a two-part poll. The first part, released Wednesday, showed that de Blasio would beat all opponents, declared and undeclared, in his bid for re-election — except for Clinton.