NEW YORK (AP) — New York City Mayor Bill de Blasio is endorsing Bernie Sanders for president, a move that puts de Blasio in a position to become a leading voice in opposition to Sanders’ newest rival, Mike Bloomberg, his predecessor in leading the nation’s largest city.

De Blasio, an unabashed liberal who was elected in 2013, will campaign for Sanders in Nevada this weekend, the Sanders campaign said Friday in a news release. De Blasio hopes to be a significant surrogate for Sanders four years after he dithered about his presidential endorsement and, late in the primary process, backed Hillary Clinton instead of the Vermont senator, who shared far more of his ideology.

“I am standing with Bernie because he stands with working families, and always has,” de Blasio said in the news release. “New Yorkers know all too well the damage caused by Donald Trump’s xenophobia, bigotry and recklessness, and Bernie is the candidate to take him on and take him down

De Blasio, whose own 2020 presidential bid ended with a whimper months before any votes were cast, could play an important role for Sanders, who now sits atop the progressive portion of the Democratic field, as the senator squares off against several more moderate choices, including Bloomberg, who led New York for the 12 years before de Blasio.

De Blasio’s 2013 campaign was styled as a rebuke to Bloomberg, who oversaw a city that rebuilt itself after the Sept. 11, 2001, terror attacks to become the nation’s safest biggest city and leading tourist destination. But Bloomberg’s tenure also saw a sharp rise in income inequality and concern about police tactics like stop and frisk, which disproportionately affected communities of color.

De Blasio, who has frosty relations with his predecessor, has repeatedly voiced his opposition to the billionaire’s late presidential bid.

WATCH: Sanders says N.H. victory ‘is the beginning of the end’ for Trump

“This is a Democratic Party today that’s getting more progressive, that wants to address the concerns of working people, that does not accept the status quo,” de Blasio said after Bloomberg announced his candidacy. “There’s no way in the world we should nominate a billionaire who epitomizes the status quo.”

Additionally, the strongest piece of de Blasio’s political base at home has been African American voters drawn to his promises of police reform, combating income inequality and his biracial family. And the mayor aims to stress those bona fides just as the Democratic nominating process heads to far more diverse states like Nevada and South Carolina.

De Blasio has long sought to play an outsize role on the national stage trumpeting progressive ideas but has struggled to raise his profile much beyond New York City. A presidential forum he sponsored ahead of the 2016 election was canceled because of a lack of interest from candidates, and his own advisers have expressed regret as to how he handled his endorsement for that campaign.

Although de Blasio was far more aligned with Sanders, he also had a debt of loyalty to the Clintons; he was the campaign manager for Hillary Clinton’s 2000 Senate run in New York, and the former first couple presided over the mayor’s inauguration in 2013. But de Blasio sat on his choice for months, and his eventual lukewarm endorsement for Clinton led to him being banished to a secondary role at the Democratic convention and on the campaign trail.