President Barack Obama said Tuesday he would advise Donald Trump to “stop whining” about the race for the White House, hitting back at the Republican presidential nominee’s statements that the election is being rigged.

Speaking at a White House press conference with Italian Prime Minister Matteo Renzi, Obama said someone who questions the soundness of the U.S. election process doesn’t “have what it takes to be in this job.”

In recent days Trump has said the election is being rigged — as in this tweet from Sunday when he cast doubt on polling places:

The election is absolutely being rigged by the dishonest and distorted media pushing Crooked Hillary - but also at many polling places - SAD — Donald J. Trump (@realDonaldTrump) October 16, 2016

Obama was also asked about Trump’s statement that he would meet with Russian President Vladimir Putin before inauguration day if he wins on Nov. 8.

Obama said the GOP nominee’s “continued flattery” of Putin was unprecedented in U.S. politics. Hillary Clinton, Trump’s opponent and Obama’s former secretary of state, has also blasted Trump for his complimentary statements about the Russian leader.

Want news about Europe delivered to your inbox? Subscribe to MarketWatch's free Europe Daily newsletter. Sign up here.