President Obama took a dig at Republican presidential candidate Donald Trump on Tuesday, urging voters not to treat the election as if it were a reality show. "We cannot afford to act as if there is some equivalence here," Obama said. (Reuters)

President Obama implored Americans on Tuesday to consider the gravity of the presidential election eight weeks away, calling Republican Donald Trump a dangerous fraud who has no real idea of what it means to be president.

Turning serious at the close of a rollicking campaign rally for Democrat Hillary Clinton, Obama allowed himself to “vent” about a Republican nominee who he said “isn’t fit in any way, shape or form to represent this country.”

With a note of exasperation, Obama said he had lost patience with the trivialities of a campaign dominated by what he called a reality-television mentality. Obama also acknowledged some of Trump’s outsider appeal and likened it to his own.

“Look, I understand. We’re a young country. We are a restless country,” Obama said. “We always like the new, shiny thing. I benefited from that when I was a candidate. And we take for granted sometimes what’s steady and true. And Hillary Clinton’s steady, and she is true.”

The rally was planned long before Clinton fell ill last weekend and canceled a planned West Coast campaigning and fundraising swing. Obama called no direct attention to her illness, even when someone in the crowd fainted and Obama told the crowd to do some knee bends and drink water.

President Obama speaks during a campaign event in Philadelphia to support Democratic presidential nominee Hillary Clinton. (Tracie Van Auken/European Pressphoto Agency)

Obama first made a joke of Trump’s admiration for Russian President Vladimir Putin, an adversary of Obama’s throughout his presidency, but then sought to shame Trump.

“I have to do business with Putin. I have to do business with Russia. That’s part of foreign policy. But I don’t go around saying: That’s my role model,” Obama said of the authoritarian former KGB agent. “Could you imagine Ronald Reagan idolizing somebody like that?”

Obama mocked the Republican and novice candidate as a fraudulent champion for the working class, suggesting that the businessman is merely exploiting this year’s populist voter mood after a lifetime of gilded circumstances.

“I keep on reading this analysis that Trump’s got support from, like, working folks,” Obama said. “Really? This is the guy you want to be championing working people? This guy who spent 70 years on this earth showing no concern for working people.”

During a midday rally in Clive, Iowa, Trump took sharp aim at Clinton and Obama, arguing that their policies have harmed the country and that Clinton’s character flaws disqualify her from being president.

“Hillary Clinton lacks the judgment, temperament and moral character to lead this country,” Trump said. And as he has done repeatedly in recent days, he went after Clinton for labeling half his supporters a “a basket of deplorables.”

Trump said he is running to “reverse” the policies of the past eight years and “create a future of prosperity for all Americans.”

Earlier in the day, Trump’s campaign issued a news release targeting Obama over his decision to campaign for Clinton. “Shouldn’t you be at work?” it said at the top, citing a series of economic and foreign-policy problems.

Eight weeks to the day until Election Day, Obama appeared to revel in his star turn as Clinton’s defender. He said he “really, really, really” wants to see her elected and pledged to work hard on her behalf.

“I could not be prouder of the leader we have nominated to take my place,” Obama said. “Even though I have run my last campaign, I am going to work as hard as I can this fall to elect Hillary Clinton the next president of the United States.”

But he seemed most energized when criticizing Trump. He left little doubt that he is on a personal mission to defeat the man who rose to political prominence as the celebrity proponent of the false “birther” theory that Obama was not born in the United States and is therefore not legitimately president.

“This guy’s suddenly going to be your champion?” Obama asked. “I mean, he spent most of life trying to stay as far away from working people as he could, and now this guy’s going to be the champion of working people. Huh?”

“I mean, he wasn’t going to let you on his golf course,” he added. “He wasn’t going to let you buy in his condo. And now suddenly this guy’s going to be your champion?”

He drew laughs when he took aim at Trump’s charitable foundation, noting, as The Washington Post reported, that he “took money other people gave to his charity and then bought a 6-foot-tall painting of himself. He had the taste not to go for the 10-foot version.”

Obama scolded the news media, saying it is applying “unfair” scrutiny to Clinton while grading Trump “on a curve.”

Clinton had never planned to attend the event, which was part of a push to rally Democrats with the biggest names backing Clinton this year. Vice President Biden and Michelle Obama were also campaigning for Clinton this week.

Clinton’s campaign sent out Twitter messages quoting Obama while he made the case that she represents inclusion and diversity, compared with what Democrats call Trump’s message of division and bigotry.

“All of us, young, old, men, women, black, white, Latino, Asian, Native American, folks with disabilities, all pledging allegiance to the same flag — that’s the America I know,” Obama said. “That’s the America you know and believe in. And there is just one candidate in this race who’s devoted her life to building that America.”

Obama is next expected on the trail in October, with a focus on young voters, blacks and Hispanics. Clinton’s strategists hope that Obama’s enduring popularity among Democrats, and his sway with African Americans and younger voters, can help Clinton overcome the difficult hurdle of winning a third term for the same political party.

“It is good to be back on the campaign trail,” Obama said as he began some 40 minutes of remarks.

Obama reflected on his fierce 2008 primary contest with Clinton, especially in Pennsylvania, where Clinton won the primary and kept her bid alive.

“Every time I thought I had that race won, I was like going up the ‘Rocky’ steps,” Obama said. “I was about to celebrate, and then I looked. She’s right there. And I got whupped here in Pennsylvania. She whupped me.”

The enthusiastic crowd was gathered outdoors on a balmy late-summer afternoon in front of the historic Philadelphia Museum of Art, whose front steps were featured in the Sylvester Stallone movie.

Clinton has tied herself closely to Obama, whom she served as secretary of state, and gives him credit in nearly every speech for pulling the country out of the “ditch” of the Great Recession at the start of his tenure.

No one, and certainly not Trump, really knows what it means to be president and make life-and-death decisions, Obama said.

“Anybody can pop off,” he said. “Anybody can fire off a tweet. Everybody’s a critic. But that doesn’t mean you know what it’s like to manage a global crisis. You don’t know what it’s like to send a group of young people to war knowing some won’t come back. But the closest you can come to understanding what it’s like is to be where Hillary’s been, to have been part of those decisions.”

Sean Sullivan in Clive contributed to this report.