When Bill de Blasio took office in 2014 as the most left-wing mayor in New York’s modern history, skeptics forecast disaster. In the post-Giuliani and post-Bloomberg era, they predicted, the city would roll back to the chaotic 1970s, when crime rates soared, garbage piled high in the streets, corporations fled to leafier environs and municipal bankruptcy loomed.

None of those dire warnings became reality. New York remains, on the whole, well run. Crime has continued its remarkable decline. Garbage is collected as efficiently as ever. The local economy is humming, and municipal finances are sound, with steady budget surpluses. Most unions representing city workers are content.

The mayor swiftly made good on his signature campaign pledge of universal prekindergarten classes in public schools. He is on a path to fulfilling a commitment to build or preserve 200,000 apartments over 10 years. He lowered speed limits on city streets to reduce traffic deaths (though the decline has not been as impressive as was hoped), and he continued laudable public-health policies begun by his immediate predecessor, Michael Bloomberg. Simmering racial animosities have stayed in check, when they might well have boiled over after the deaths of several black men at the hands of police officers.

So we firmly endorse Mr. de Blasio in this primary as he seeks a second, and final, term and urge Democratic voters to support him next Tuesday over four lesser-known opponents. His able stewardship of the country’s largest and most cantankerous city deserves to be rewarded.

That is not to say it has been perfect. Every New Yorker sees homelessness rising, with many more people living on the street and more families flocking to city-run shelters; the mayor acknowledges that this is a problem he won’t soon conquer. He has not used the full power of his bully pulpit to demand fixes for the hobbled mass transit system, choosing instead to squabble with the governor more than is necessary or wise, while his own constituents are the ones who suffer. (The mayor even had to be prodded to ride the subway more frequently.) He also has made almost no attempt to control the epidemic of small-store closings that blights one neighborhood after another.

A political operative before he ran for public office, Mr. de Blasio has not shaken free of detractors’ suspicions about his ethical compass. He was subjected to both federal and state investigations into whether he presides over a pay-to-play system that favors well-heeled donors seeking favors from City Hall. Ultimately, no charges were brought against him or his aides. Though the mayor declared he had been vindicated, the Manhattan district attorney concluded that some of his fund-raising appeared to have violated “the intent and spirit” of the law. That’s a far cry from Mr. de Blasio’s claim to have been pronounced “innocent.”

Disquiet about his character is felt by many New Yorkers, including some on the left who enthusiastically support his policies. There is a moral haughtiness that has served him and the city ill in relations with Albany. It also renders him almost incapable of publicly admitting error. He is not, to borrow Ed Koch’s occasional self-description, Mayor Culpa. And he seems to have not absorbed the admonition that you don’t get a second chance to make a first impression. Early on, he showed up late so often, including to an annual memorial in Queens for air-disaster victims, that he acquired a reputation for laziness that, fairly or not, still clings to him.

All told, though, Mr. de Blasio has been an effective mayor. He has taken care of essential municipal business while pursuing the progressive agenda that is dear to him. Arrests, for instance, are down on his watch. So are police stop-and-frisks that focused on young African-American and Latino men, most of them guilty of nothing. Yet none of that has translated into a rise in crime. On the contrary, New York is on track to end 2017 with fewer than 300 murders, an achievement once unimaginable.

As a sign of how well this mayor has performed, major politicians who’d love to replace him decided he wasn’t vulnerable and took a pass on this election, preferring to wait until term limits force him to leave office at the end of 2021. His challengers for the Democratic nomination are four men who earnestly offer their own visions for the city but who are hardly well recognized and have been unable to break through as serious contenders.

They are Sal Albanese, a centrist former councilman running for mayor a third time; Robert Gangi, a forceful advocate for criminal justice reform; Michael Tolkin, a technology entrepreneur who says he would apply his business skills to municipal governance; and Richard Bashner, a Brooklyn community board member who describes himself as “the thinking man’s candidate.” No incumbent should have a free ride, and all of these men should be commended for ensuring that Mr. de Blasio doesn’t have one. Indeed, all should have been included in a debate held two weeks ago and another one scheduled for Wednesday night. Only Mr. Albanese has made it to the stage because the others did not meet money-raising requirements.

We’d like to hear more from the mayor about his priorities for his probable second term. What will he do to reshape a New York that remains unaffordable for far too many residents, even with the new housing Mr. de Blasio boasts of? Test scores may have improved during his tenure (perhaps because the exams are easier than before), but most schoolchildren still read below grade level. How, if at all, will he reach out to segments of the populace that have not embraced his mayoralty? His approval ratings among whites, to cite one group, have been troublingly low from the get-go.

At some point, the New York economy is likely to stop chugging along as robustly as it has. The pendulum always swings. So the mayor — any mayor — must be ready to pare the municipal payroll, which has grown substantially in the last four years. If, as feared, federal aid shrivels under a Trump administration hostile to city needs, those reductions could be substantial. We don’t expect Mr. de Blasio to announce at this point precisely what he would cut, but we hope he has begun thinking about what to do if the good times end.

Most New York mayors see themselves as national figures. This one is no exception. He has presented himself as a voice — he’d like to think the voice — of progressive America and suggests he is not about to stop taking his message around the country.