Bernie Sanders. AP Photo/Evan Vucci Third-party presidential candidates are not worth a vote in the 2016 election, according to Bernie Sanders.

At a rally for Democratic congressional candidate, Zephyr Teachout in New Paltz, New York on Friday, the Vermont senator advised voters not to vote for a third-party candidate for president and to remain focused on stopping Donald Trump.

"When we're talking about president of the United States, in my own personal view, this is not the time for a protest vote," Sanders said, according to the The Washington Post. "This is [the] time to elect Hillary Clinton and then work after the election to mobilize millions of people to make sure she can be the most progressive president she can be."

Sanders began campaigning for Clinton after losing the Democratic presidential primary to the former secretary of state.

Sanders was a spoiler for the Democratic nominee during the primary, but has since become an outspoken critic of third-party candidates like the Green Party's Jill Stein and Libertarian nominee, Gary Johnson.

"I know more about third-party politics than anyone else in the Congress, okay? And if people want to run as third-party candidates, God bless them! Run for Congress. Run for governor. Run for state legislature," Sanders said.

Sanders' pitch to elect Clinton has been met with some opposition from his most ardent supporters amid controversy that the Democratic party favored Clinton during the primary.

Outrage from Sanders' supporters gripped the Democratic National Convention in July, where Clinton formally accepted the party's nomination for president.