Mayor Bill de Blasio is finally backing Bernie Sanders for president.

Hizzoner — who pulled the plug on his own quixotic presidential bid last September — will endorse the left-leaning Vermont senator for the Democratic presidential nomination in the coming days, City Hall sources confirmed Friday.

He’s expected to travel with the self-described “Democratic socialist” and party outsider in Nevada both Sunday and Monday, appearing at events ahead of the Feb. 22 caucuses, sources said.

It’s a reversal from four years earlier when de Blasio backed Hillary Clinton over Sanders, after famously waffling for months — but not necessarily surprising.

The mayor has since repeatedly said he believes Sanders would have defeated Republican Donald Trump in the 2016 presidential election if Sanders had won the primary.

De Blasio decided to go all-in on Sanders only days after Sanders established himself as the Democrats 2020 frontrunner with a nail-biting victory in New Hampshire primary.

The two have spoken several times since Hizzoner dropped out of the presidential race five months ago, after failing to crack 1 percent in the polls.

Hizzoner has a long history of “feeling the Bern.”

Sanders swore de Blasio in two years ago at the inauguration for his second term as mayor and the mayor spent time at Sanders’ vacation home in Vermont.