Republican presidential candidate Donald Trump is many things — for local elected officials, he's proven an effective foil, particularly on immigration.

"You’re going to keep the Syrians out. You’re going to keep the Mexicans out. 'This is our land.' By the way, who are you that this is our land?" asked Governor Andrew Cuomo. "Who are you, are you a Navajo? Are you an Apache? Are you a Sioux? Are you a Native America? Otherwise you’re an immigrant too."

That line got the crowd on its feet Monday at the National Immigrant Integration Conference, where Governor Cuomo highlighted immigrant-friendly policies and his own family's immigrant story. Ditto Mayor Bill de Blasio, who also bashed Trump, without mentioning him by name.

"We don’t build walls here," the mayor said. "We don’t create lists on the basis of ethnicity. We don’t make refugees take religious tests."

Both men — including Cuomo in a TV interview — also argued Trump's proposals play into the hands of terrorists.

"Donald Trump could be a recruitment poster for ISIL, because he is fanning the flames of hate," Cuomo said in morning television interview.

"They want the imagery of the majority in this nation turning against our Muslim population," the mayor said at Monday's conference. "And it is therefore all the more important that we embrace our Muslim population at this very moment."

Both Cuomo and de Blasio also sought to make a bit of news here Monday as it relates to their immigration policies. For de Blasio, that included announcing a new, $8 million program to provide legal services in immigrant communities.

The administration also announced the city's municipal ID card — which nearly 700,000 New Yorkers now own — will again be free to applicants next year, and include expanded benefits like a CitiBike discount.

And Cuomo announced his worker exploitation task force launched in July has already opened 450 cases, while the state has won $29 million in recovered wages this year for 24,000 workers.