(Photo credit: Rich Pedroncelli/AP)

Mayor Bill de Blasio was back on the presidential campaign trail Sunday - but this time, he joined his former competitor Bernie Sanders in Nevada. 

Supporters waited in line for hours in Carson City to see Sanders, where the mayor was supporting him. More than 1,000 people turned out to the rally.

De Blasio, who was fighting a cold and a raspy voice, told the crowd that Sanders can beat President Donald Trump in the race for the White House.

"You know, this morning, when you woke up, did you feel something in the air? Did you feel a little something? Did it feel like change is in the air?" de Blasio said. "It didn't feel cold because you felt the Bern, didn't you?"

He and Sanders also took aim at a former New York City mayor, Michael Bloomberg, who is now a Democratic candidate for president. 

De Blasio took on Bloomberg for the former mayor's record on the NYPD's stop-and-frisk policy.

"For years and years, we were told that we needed a broken and discriminatory system that denigrated young men of color, that separated police from community and created division," de Blasio said. "I am sorry to report to you that the chief proponent of stop-and-frisk is, in fact, running for president of the United States this election."

Sanders took aim at Bloomberg's high spending in the race.

"Now, Mike Bloomberg is struggling. He's down to his last $60 billion. Hey, life is hard, you know?" Sanders said. "Well, I got news for Mr. Bloomberg, and that is, the American people are sick and tired of billionaires buying elections."

De Blasio officially endorsed Sanders on Friday.

He will also campaign for Sanders in Las Vegas on Monday.