Media playback is unsupported on your device Media caption Hillary Clinton told reporters on her campaign plane: "I am doing great"

Hillary Clinton has vowed she will never give up as she hit the campaign trail again following a three-day rest after being diagnosed with pneumonia.

Speaking at a rally in Greensboro, North Carolina, the Democratic nominee said her time off was a gift, allowing her to reflect on the campaign.

She walked on stage to the sound of James Brown's I Feel Good to deliver a speech on the economy.

Polls indicate a tightening White House race, with 54 days to election day.

Mrs Clinton's return comes a day after her doctor said she was "healthy and fit".

A history of US presidential bad health

She told a boisterous crowd at Thursday's rally: "With just two months to go until election day, sitting at home was pretty much the last place I want to be."

Media playback is unsupported on your device Media caption Trump says he needs to lose weight (2016)

"People accuse me of all kinds of things," she added, "you probably have seen that, but nobody ever accuses me of quitting and I will never give up, I'll never walk away, no matter how tough the going gets."

The 68-year-old said she felt "lucky" that she could afford to take a few days off, compared with the millions of Americans who could not.

At a brief press conference afterwards, Mrs Clinton was asked whether she had shared details of her pneumonia diagnosis with her running mate, Tim Kaine.

She appeared to parse her words carefully as she replied that "many senior staff knew and information was provided to a number of people".

"This was an ailment that many people just power through," she continued, "and that's what I thought I would do as well."

She then jetted off to a give a speech at an event in Washington DC.

The race has focused on both candidates' state of health and medical records in recent days.

Analysis - Anthony Zurcher, BBC News, Washington

As countless thousands of armchair physicians looked on, Hillary Clinton took to the campaign trail for the first time since her near-collapse on Sunday. It was a speech where "optics" mattered at least as much as what she said. Did she look healthy? Was her voice strong?

Aside from a bit of hoarseness, Mrs Clinton hit her marks - a sharp contrast from the wobbly figure helped into a van on Sunday. If she keeps this up, her health concerns will likely recede into the background.

Perhaps more notably from a strategic perspective was Mrs Clinton's humbler, more personal tone.

She admitted her faults, but said one of her strengths was never quitting. Early on, she pivoted from talking about her illness to the struggles of Americans who can't afford quality healthcare.

Although she took swipes at Donald Trump, she only referred to him as "my opponent". As she told the press after her speech, she wants to give Americans "something to vote for, not just against".

Her campaign has relentlessly bashed Mr Trump over the past months, but she seems to be acknowledging that this alone may not be enough to win her the presidency.

On Thursday, Donald Trump released a letter from his doctor saying he is in "excellent physical health", albeit overweight.

The Republican nominee earlier this year released a brief memo from the same physician asserting he would be "the healthiest individual ever elected to the presidency".

The 70-year-old businessman also discussed his health with Dr Mehmet Oz during a taped episode of the medical chat show, which aired on Thursday.

Media playback is unsupported on your device Media caption Hillary Clinton: "It's important to sit with your thoughts every now and then"

At a rally in Ohio on Wednesday, Mr Trump used Mrs Clinton's recent health scare to cast doubt on her stamina.

He said: "I don't know folks, do you think Hillary Clinton would be able to stand up here for an hour?"

On Sunday, she had to be helped into a van after abruptly leaving the World Trade Center memorial after aides said she felt "overheated".

In other developments:

Ivanka Trump cut short an interview with Cosmopolitan after objecting to the questions

Donald Trump, Jr denied anti-Semitism after he accused the media of not holding Democrats to account, adding: "If Republicans were doing that, they'd be warming up the gas chamber right now"

Donald Trump, Jr also said his father had declined to release his tax returns because they would only distract from his main message, according to the Pittsburgh Tribune-Review

What you need to know about US election

Media playback is unsupported on your device Media caption Why some states matter more than others

How does the US election work?

Why this election will make history

What is it about Clinton that her fans love?

50 Trump supporters explain why they back him