Barack Obama appeared to compare Donald Trump's presidency to Hitler's rise to power during a speech in Chicago on Tuesday.

The former president was speaking at an event thrown by the Economic Club of Chicago at a Hilton hotel when he made the remarks.

Without mentioning the current president, Obama told the gathered audience of 1,800: 'We have to tend to this garden of democracy or else things could fall apart quickly.

'That's what happened in Germany in the 1930s, which despite the democracy of the Weimar Republic and centuries of high-level cultural and scientific achievements, Adolph Hitler rose to dominate.

'Sixty million people died. So you've got to pay attention.'

Barack Obama spoke at an Economic Club of Chicago event on Tuesday where he invoked Hitler's rise to power to illustrate how fragile the country is which has since been interpreted as a dig at President Trump and the current political era

The comments were part of a wider warning to the audience not to grow 'complacent' and take democracy for granted.

He also spoke of a 'nativist mistrust' which has 'swept the world', in the words of a Chicago Business reporter who attended the event.

Although not explicitly directed at Trump, his comments have been widely interpreted as an attack on the president and his America First agenda.

Elsewhere in the Q&A session, Obama spoke of the importance of the US's role in international development.

'Things don't happen internationally if we don't put our shoulder to the wheel.

'No other country has the experience and bandwidth and ideals...If the U.S. doesn't do it, it's not going to happen,' he said.

In another apparent jibe at the media-wary president, Obama said that during his time in office, he 'understood the principle that the free press was vital.'

Obama also spoke of the importance of foreign policy and how the US should be a world leader

Obama did not mention President Trump (above in the Oval Office on Thursday) by name

The president's fans were outraged by the remarks which they said drew a direct comparison to the Nazi dictator

Adolf Hitler came to power as Germany's Chancellor in 1933 as head of the National Socialist German Workers' Party

Trump's fans reacted angrily to comments.

Among them was game show talk host Chuck Woolery who called the remarks 'despicable'.

Others said they were 'un-American' and 'disgusting'.

His remarks came a day before Trump declared Jerusalem the capital of Israel, sparking fury among Muslims around the world and feeding concern for escalated tensions in the Middle East.

On Thursday, after news of Obama's remarks spread, Trump fans said the move proved he was a friend to Jews and separated him from the Nazi leader.

They did not acknowledge the anger the decision fueled among billions of Muslims around the world much less in Palestine where residents burned the American flag in response to the announcement.

Hitler became Chancellor in January 1933 after rising through the democratic ranks of the Reichstag.

Two months later, the first concentration camp was opened.