The New York City mayor, who was briefly a presidential candidate himself, is scheduled to campaign with Mr. Sanders in Nevada ahead of the caucuses there next week.

Mayor Bill de Blasio of New York, whose brief presidential campaign failed to get off the ground last year, endorsed Senator Bernie Sanders of Vermont for the Democratic nomination on Friday.

In a statement released by the Sanders campaign, Mr. de Blasio said he was supporting Mr. Sanders because he “stands with working families” and was the right candidate to take on President Trump.

“I have called for a bold, progressive agenda, and that’s exactly what Senator Sanders has championed for decades,” Mr. de Blasio said.

His choice is a reversal from four years ago, when he endorsed Hillary Clinton over Mr. Sanders, but it is not entirely unexpected. He said last summer that in retrospect, he believed Mr. Sanders would have won the 2016 election if nominated.

Read More