President Barack Obama on Thursday criticized Republican presidential nominee Donald Trump for refusing to say whether or not he will accept the result of the Nov. 8 election if he loses, calling that attitude "dangerous."

"That is dangerous because when you try to sow the seeds of doubt in people's minds about the legitimacy of our elections, that undermines our democracy," Obama said at a campaign rally in Miami where he asked people to vote for the Democratic presidential nominee, Hillary Clinton.

Obama referred to Trump's remark at the third presidential debate against Clinton on Wednesday evening, when he said that he would determine after the election whether or not he would accept the result and repeated his claim that the election process is "rigged" in favor of the former secretary of state.

"Then you're doing the work of our adversaries for them. Because our democracy depends on people knowing that their vote matters," Obama said in a speech at a university in Miami Gardens, in the Greater Miami area.

The president, who earlier this week condemned Trump's "unprecedented" claims that the election process is rigged against him, insisted in Miami that U.S. citizens believe in democracy and accept "the will of the people."

The president also spoke about voters in Florida, one of the key states in this year's election, who instead of booing the Republican candidate should get out to vote against him, which he said is the message the mogul will really hear on Nov. 8.

In his remarks, Obama emphasized Clinton's experience in government and as a public servant, said that she "never gives up," knows what she is talking about, and has real plans to reduce economic inequality and the effects of climate change.

"Progress is on the ballot. Stability is on the ballot. Tolerance is on the ballot. Justice is on the ballot. Equality is on the ballot. Our democracy is on the ballot. Hillary Clinton will advance those things. Donald Trump wants to reverse progress," the president said.

Obama also devoted part of his speech to criticize Republican senator from Florida Marco Rubio, who is running for reelection against Democratic Congressman Patrick Murphy, for whom the president reiterated his support.

"Even Marco Rubio says there is no rigging of the vote, which I'd like to give him credit for, except he's refuting the dangerous, unprecedented claims of a candidate he says he's still going to vote for!" Obama said.

"How can you call him a con artist and dangerous and object to all the controversial things he says and say I am still going to vote for him? ... It is the height of cynicism," he said.

The president also spoke about the health care reform package he has been pushing since 2010, saying that Obamacare could move forward if the governors of 19 states would leave politics to the side and extend Medicaid.

Florida, one of the swing states in 2016, has 29 electoral votes - more than one-tenth the 270 total electoral votes needed to win the presidency.