Media playback is unsupported on your device Media caption Nazis, demagogues and conspiracy theories - three Obama attacks on Trump

Former US President Barack Obama has launched a stinging attack on Donald Trump and the "crazy stuff that is coming out of this White House".

"This is not normal, these are extraordinary times and they are dangerous times," Mr Obama told students at the University of Illinois.

He called for "a restoration of honesty and decency and lawfulness in our government".

The ex-president has kept a low profile since he left office in 2017 until now.

Mr Obama told Friday's awards ceremony in Urbana, Illinois, that he had been intending to follow the American tradition of former presidents exiting the political stage.

He instead launched into a searing attack on the current Republican administration.

In response, President Donald Trump said at a Republican fundraiser in Fargo, North Dakota, on Friday that he had watched his predecessor's speech, "but I fell asleep".

Mr Obama was trying to take credit for "the incredible things happening to our country", he added.

Gloves are off

By Gary O'Donoghue, BBC News, Washington

Democrats - with some frustration - have been waiting for the reappearance of Barack Obama for some while.

The party's not-so-secret weapon has been reluctant to break with the tradition which dictates that former presidents don't snipe from the sidelines.

There's also been the matter of a book to write and raising money for his foundation.

But now it looks like he's prepared to launch himself wholeheartedly into the mid-term campaign for the next eight weeks.

While the headlines of this speech will all focus on the criticisms of the current president, there was also a serious message directed at his own party.

Build coalitions - across racial, socio-economic and geographical divides. It was the formula that won him two presidential terms, and it was his message to the party as it attempts to wrest back control of Congress.

But there's a huge dilemma here, for Barack Obama and for his party. There's no doubt he has the ability to fire up the Democratic foot soldiers like no-one else can.

But equally he can be a galvanising motivation for the ultras in the Republican party.

One thing we can be sure of: Donald Trump will feel he's just got himself another big target to aim at as he hits the stump, too.

In his address, Mr Obama warned that American democracy depended on his audience turning out to vote in the November's congressional mid-term elections.

"Now, some of you may think I am exaggerating when I say this election is more important than any I can remember in my lifetime," the Democrat said.

"But just a glance at recent headlines should tell you that this moment really is different."

Mr Obama made an apparent reference to a New York Times editorial that has infuriated Mr Trump.

Its anonymous author, described as a senior Trump administration official, claimed to be with working colleagues to protect the country from the current president's "worst inclinations".

Mr Obama said: "They are not doing us a service by actively promoting 90% of the crazy stuff that is coming out of this White House and then saying, 'Don't worry. We are preventing the other 10%.'"

But he also told his audience that Mr Trump was "a symptom, not the cause" of the divisions in the US.

He lacerated Mr Trump's calls for the US Department of Justice to investigate his political enemies.

"It should not be a partisan issue to say that we do not pressure the attorney general or the FBI to use the criminal justice system as a cudgel to punish our political opponents."

The 44th president of the US was also scathing about Mr Trump's initial restraint when asked last year to condemn far-right protesters in Charlottesville, Virginia.

"We are supposed to stand up to bullies, not follow them," Mr Obama said. "We are supposed to stand up to discrimination and we sure as heck supposed to stand up clearly and unequivocally to Nazi sympathisers."

"How hard can that be? Saying Nazis are bad?"