Hillary Clinton addresses a campaign rally with President Obama Tuesday in Charlotte, N.C. (Melina Mara/The Washington Post)

Under ordinary circumstances, the prospect of a popular president walking down the stairway of Air Force One in a battleground state with his favored successor would be a political high point.

But the much-anticipated joint appearance here Tuesday by President Obama and Hillary Clinton had an unexpectedly awkward backdrop — coming hours after FBI Director James B. Comey rebuked Clinton’s “careless” handling of sensitive government information on her private email setup while secretary of state.

The scene in North Carolina served as a reminder that Obama has stuck by his former Cabinet secretary as the scandal eroded voters’ trust in her over the past year — and that, in the campaign’s final stretch, he will serve as a crucial defender and advocate.

“I believe in Hillary Clinton,” Obama boomed to a packed crowd at the Charlotte Convention Center.

Neither he nor Clinton mentioned the FBI investigation in their public remarks — but on a day that Clinton’s judgment and character had been questioned, Obama said his respect for Clinton had never wavered.

“My faith in Hillary Clinton has always been rewarded,” he declared, with his shirtsleeves rolled up and Clinton perched on a chair a few feet away. “And there has never been any man or woman more qualified for this office than Hillary Clinton — ever. And that’s the truth.”

Obama had telegraphed soon after Clinton’s private email setup was revealed last year that he did not see the matter as a major problem, telling CBS’s “60 Minutes” eight months ago that Clinton’s use of a private server for official purposes was a “mistake” but that it was “not a situation in which America’s national security was endangered.” He added that the controversy had been “ginned up” by Republicans hoping to block her path to the Oval Office.

While Comey on Tuesday took pains to say that the FBI’s investigation was independent and free of partisan interference, the timing of the Obama-Clinton rally gave Republican critics a chance to question whether the president’s support for Clinton had affected the FBI’s decision not to recommend criminal charges.

Doug Andres, a spokesman for House Speaker Paul D. Ryan (R-Wis.), mocked the spectacle of Obama boarding a plane where Clinton was already seated, tweeting: “Great day for Team Clinton and The Most Transparent Administration In History™”

Presumptive GOP nominee Donald Trump criticized both Clinton and Obama in multiple tweets Tuesday. “FBI director said Crooked Hillary compromised our national security. No charges. Wow! #RiggedSystem,” he tweeted.

Earlier, Trump tweeted about the trip: “Taxpayers are paying a fortune for the use of Air Force One on the campaign trail by President Obama and Crooked Hillary. A total disgrace!”

The Clinton campaign will pay a portion of the president’s travel expenses, according to White House press secretary Josh Earnest, through the Democratic National Committee.

Earnest declined to comment in detail Tuesday about Comey’s recommendation, noting that the Justice Department hadn’t reached a final conclusion in the case. “The president is aware of the news,” he said.

Still, Comey’s decision to wrap up the probe Tuesday took the White House by surprise. Obama aides had rescheduled the rally in Charlotte, originally planned for last month, in the wake of the mass shooting at an Orlando nightclub that killed 49 people. Obama and Clinton had planned to campaign together in Green Bay, Wis., just three days after the massacre.

A senior Democrat familiar with the plans for Clinton to campaign with Obama called the timing “slightly awkward, but overall far better than the alternative.”

“The issue would have hung over their heads regardless,” said the Democrat, who spoke on the condition of anonymity to describe internal political strategy.

Aides to Clinton acknowledged the inopportune timing of the announcement, but insisted that they were relieved to have it out and were not surprised by its substance.

“It’s a great day,” John Podesta, a top Clinton adviser, said after the plane landed. When asked by a reporter whether the FBI announcement detracted from the joint event, he replied, “Hardly.”

Obama’s presence Tuesday reflected how the president’s thinking about his fiercest 2008 primary opponent has evolved, as well as his determination to block Trump from the White House.

Without mentioning the New York businessman by name, he mocked Trump’s tendency to take to Twitter, saying, “Everybody can tweet, but nobody actually knows what it takes to do the job until you’ve sat behind the desk.”

Taking aim at Trump’s populist appeal, Obama added later: “If your concern is working people, this is not a choice. I don’t care if you’re black, white, Hispanic, Native American, polka-dot, male, female.”

Aaron David Miller, vice president for new initiatives at the Woodrow Wilson International Center for Scholars, said that Obama can serve as a key validator for Clinton and that any concern the president might have about the email scandal is “trumped by any sense that he has one alternative, and that is to ensure her election” to protect his legacy.

Air Force One’s passenger list spoke to how deeply the Obama and Clinton camps are intertwined. The three senior aides accompanying Clinton on the plane — Podesta, Jake Sullivan and Huma Abedin — all served in the Obama administration. Obama’s former communications director, Jennifer Palmieri, now plays that role for Clinton and flew separately to the event.

Back in 2012, as Obama’s popularity sagged and Clinton’s remained high, White House aides contemplated whether it was worth putting her in Vice President Biden’s spot. But as Obama has made a comeback and Clinton has faced ethics questions about her email practices and her highly paid corporate speeches, she needs the president to win over undecided voters as well as liberal Democrats supporting her primary rival, Sen. Bernie Sanders (Vt.).

“Preaching to the choir,” as Obama described the audience in Charlotte, the two politicians made a joint pitch for what would amount to a third Obama term. They heaped praise upon each other and spoke of Democratic priorities such as middle-class jobs and clean energy.

Clinton alluded to the fact that not only was the election of the nation’s first African American president historic, but so would be the first win by a woman.

“Just think about those early patriots who met in Philadelphia that hot summer of 1776. They knew we would all rise or fall together,” she said. “Now, nobody who looked like Barack Obama or me would have been included back then, but we’re here today because the story of America is the story of hard-fought, hard-won progress.”

Obama worked to put the focus on Clinton.

Taking the stage to Rachel Platten’s “Fight Song” rather than “Hail to the Chief,” the president led the audience in chants of “Hill-a-ry.”

Standing behind a lectern bearing the presidential seal, he said, “I have had a front-row seat to her judgment and her toughness and her commitment to diplomacy.” When faced with adversity, he added, “she’d just stand up straighter and come back stronger.”

Comey’s announcement was not likely to affect Clinton’s schedule for the rest of the week, aides said. She is planning to deliver a speech in Atlantic City on Wednesday that aides say has the potential to broaden the discussion if not temporarily change the subject. She plans to take aim at Trump’s business record in the coastal casino city that, according to an advisory by Clinton’s campaign, includes “multiple bankruptcies, stiffing contractors and spurring hundreds of job losses while pocketing cash for himself.”

On Friday, Clinton is scheduled to campaign with Biden in Scranton, Pa., where he plans to testify to her character and values.

Eilperin reported from Washington. David Nakamura and Anne Gearan in Washington contributed to this report.