BRYAN R. SMITH via Getty Images President Barack Obama said voting for a third party candidate, like Gary Johnson, would be voting for Donald Trump.

WASHINGTON ― President Barack Obama on Wednesday said that anyone who votes for a third party candidate or does not vote in the November election is supporting Donald Trump.

“If you don’t vote that’s a vote for Trump. If you vote for a 3rd party candidate that’s a vote for Trump,” Obama said during an interview on Steve Harvey’s radio show.

Libertarian candidate Gary Johnson and Green Party candidate Jill Stein are earning 7.4 percent and 2.4 percent in Real Clear Politics average of national polls. Neither candidate was invited to participate in the first presidential debate, but still had plenty to say during it.

Obama, who has campaigned for Hillary Clinton, also told Harvey that his legacy was on the ballot in November.

“All the work we’ve done over the last eight years is on the ballot,” he said.