After a rocky series of days, Hillary Clinton turned to her old boss for a little help.

President Barack Obama hit the campaign trail for his former secretary of state with a rally Tuesday in Philadelphia. It couldn't have come at a more crucial moment as Clinton’s critics question the Democratic presidential nominee’s transparency as she gets treated for pneumonia, takes heat for declaring half of rival Donald Trump’s supporters are “deplorable” and as polls show Clinton’s lead narrowing nationally.

“I could not be prouder of the leader we have nominated to take my place. So even though I’ve run my last campaign, I’m going to work as hard as I can this fall to elect Hillary Clinton as our next president of the United States of America” said Obama at the plaza in front of the Philadelphia Museum of Art.

He also went after Trump, declaring the real estate mogul is offering America a dark, pessimistic vision.

"In election season you will often hear crazy stuff. But I gotta say this year we’ve been hearing a little more crazy than usual."

Obama continued as the crowd chanted "HILL-A-RY."

"What we have seen from the other side in this election, this isn't Abraham Lincoln's Republican Party. This isn't even the vision of freedom that Ronald Reagan talked about. They're not offering serious solutions. They're just fanning resentment and blame and anger and hate. And that is not the America we know. That's not the America I know," he said.

Related: First Read: Why Hillary Clinton Needs Barack Obama More Than Ever

Obama is seen as Clinton’s ace in the hole, especially with his 58 percent job approval rating.

The president could potentially re-energize Latinos and millennials—key voting blocs Obama has secured but a group Clinton has had a tougher time nailing down. Obama could be particularly effective in firing up young liberals who were excited about Bernie Sanders, but who see supporting Clinton as less "Yes we can" and more "Yes I guess we should."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

President Barack Obama and Democratic Presidential nominee Hillary Clinton embrace on the third day of the Democratic National Convention at the Wells Fargo Center, July 27, 2016 in Philadelphia, Pennsylvania. Alex Wong / Getty Images, file

Obama on Tuesday insisted, "I am really into electing Hillary Clinton. This is not me going through the motions here. I really, really, really want to elect Hillary Clinton," noting he knows firsthand how tough and hardworking she is from his tough primary battle against her in the 2008 election cycle and her consequent work for him as secretary of state.

Meanwhile, Obama said Trump is "Not really a plans guy, a fact guy."

Obama said he was floored by analysis he's read about working people supporting Trump.

“Really, this is the guy you want to be championing working people? this guy who spent 70 years here on this earth who spent no concern for working people," the president said. "Is this guy suddenly going to be your champion?”

White House officials have confirmed Obama's goal on the campaign trail will be to once again expand the electorate.

"The president does a lot of influence over a large number of voters that haven't previously been regularly engaged in politics," White House press secretary Josh Earnest said.

Having Obama’s first solo campaign appearance of the year in Philadelphia is no coincidence.

It’s where the Democratic National Convention took place and a state that Obama secured in 2008 and 2012.

A recent survey from Quinnipiac found Clinton leading Trump by just five points in the battleground state. The GOP nominee sees Pennsylvania, and its white working class voters, as crucial to his victory.

While Obama was met with thousands of cheering fans as he spoke in front of the Philadelphia art museum, a lack of enthusiasm for Clinton could be felt on the ground at the rally, where multiple supporters said they wanted to see Clinton be a little more motivational, as Brooke Baldwin, a retiree from Philadelphia, put it. "I think she'd make a very great president, she's very competent, but she's not motivating me particularly, Baldwin said. I'm gonna vote for her, but I wish she were more exciting."

Clinton was supposed to be fundraising in California this week, but canceled her trip after briefly collapsing Sunday at a 9/11 ceremony in New York. Critics contended she was being less than forthcoming about her health — Clinton was diagnosed with pneumonia on Friday, but only disclosed it after her near-fainting spell. In response, Clinton said she will be releasing new medical records.

On Tuesday, Obama spoke to Clinton's stamina without mentioning the health flap when he noted that during the 2008 elections she was often right behind him as he prepared to celebrate a Rocky-esque moment of victory. He also noted that she doesn't quit, no matter how many times she is knocked down.

Related: Mike Pence Refuses to Call David Duke 'Deplorable'

Then there was the "deplorable" flap, with critics skewering the Democrat for writing off half of Trump's supporters as irreedemable racists.

She issued a statement over the weekend that she regretted using the word "half," but not backing down from the larger critique. What is "deplorable," she said was that Trump hired Breitbart News' Steve Bannon, "a major advocate for the so-called 'alt-right' movement to run his campaign and that David Duke and other white supremacists see him as a champion of their values."

Clinton will also be aided by two more of her popular surrogates this week, with First Lady Michelle Obama and Vice President Joe Biden scheduled to stump for her. Obama will head to New York City for a fundraiser later in the evening.

Going forward, Obama is expected to play a very aggressive and enthusiastic role on the campaign trail.

In recent weeks, just about every time he's been asked, the commander-in-chief has seized the moment to criticize Republican nominee Donald Trump.

"I don't think the guy is qualified to be President of the United States, " the president said at a news conference last week in Laos.

The Clinton campaign has asked the president to make big pushes as voter registration deadlines approach, and then later as early voting begins.

Registration in key states like Ohio, North Carolina and Pennsylvania end during the second week of October. No details have been released about his schedule, but President Obama is expected to spend much of October fighting to get Hillary Clinton elected to protect his legacy.