The first reminder that we should not rely on midterm elections to solve everything did not even have to wait for the polls to close.

On Monday, the Middletown Common Council voted unanimously to establish a municipal identification card program starting Feb. 1.

As Mayor Joe DeStefano explained “the municipal ID program has different meanings to different people.” He listed a number of areas where the card will be useful including the one most often mentioned, an improvement in police-community relations at a time when proof of citizenship or lack of it can be a source of confrontation. But there are other purposes as well and he talked about the use as a marketing tool for businesses and to help all residents get access to city parks, pools, recreation rentals and other services.

Middletown’s courageous leadership on this issue is something for other municipalities to learn from, especially because as the mayor pointed out, “With the national immigration debate hitting new lows, we must recognize and acknowledge that this card, and one of the primary purposes of this card, will help undocumented people who live here now in the City of Middletown.”

Those new lows have been on shameful display in the past few months as Republican politicians, starting with the president and continuing down the ballot, have tried to win elections with blatant appeals to racism and fear of all immigrants.

As police in Middletown, Newburgh and elsewhere have noted ever since the federal government has tried to enlist them in enforcement of immigration laws, these cities have many immigrants, legal and otherwise, and most of them do not violate the laws. If they do, they will be arrested. But local police do not want to become the enforcement arm of a federal force that has little interest in the public safety in our communities.

Police have long said that they need the trust of the community, the whole community, to help keep the peace. And the immigrant community needs to know that they can trust police, that they can keep police informed so that they can solve crimes when they occur and anticipate trouble before it escalates.

If immigrants fear that any contact with police might lead to an arrest, then they are not going to be those important sources of information.

But this is not only a bottom-up argument. There is a lot of support from the top down, starting with what seems like an unrelated U.S. Supreme Court decision striking down state laws prohibiting sports betting. The underlying principle that the court upheld concerned the relationship between federal and other governments. In essence, the court said that states could not be forced to ban such gambling if they did not want to. And that prohibition also extends to other federal efforts, most notably the sanctuary cities movement and the relationship between local police and federal forces.

Cities that want to make a difference in the lives of all their citizens should follow the Middletown example and pay special attention to something else the mayor said: the city will go to court, if necessary, to protect undocumented immigrant residents.