Image copyright AP Image caption Mr Obama joked that she had beaten him in the 2008 debates

The FBI has announced it will not recommend criminal charges against Hillary Clinton over her use of private email while she was secretary of state.

FBI Director James Comey said "no reasonable prosecutor" would pursue a case but said the likely Democratic presidential nominee was "extremely careless" with classified information.

The decision ends the legal uncertainty that has dogged the Clinton campaign.

Just hours later, she appeared on stage with President Barack Obama.

Neither of them mentioned the case. Instead, Mr Obama offered her an enthusiastic endorsement at the rally in North Carolina - his first appearance with her during the campaign.

He said he believed in Mrs Clinton and there had never been any man or woman more qualified for the presidency.

Mr Comey was highly critical of Mrs Clinton and her staff: "There is evidence that they were extremely careless in their handling of very sensitive, highly classified information."

Media playback is unsupported on your device Media caption FBI Director James Comey said Hillary Clinton was "extremely careless" with emails

The FBI's key findings:

It is possible that "hostile actors" gained access to Mrs Clinton's email account

There were more than 100 emails that contained classified information when they were sent or received, contrary to her claim she never sent classified emails

But there was no evidence she had knowingly shared sensitive material

She did not delete emails in an effort to conceal them

At the scene: Kim Ghattas, BBC News, Charlotte

They were once rivals, but their political destinies are now tied. Eight years after Clinton campaigned for him, Obama took to the election trail for her and gave her a huge boost by bringing his unparalleled skills as a campaigner and orator to Charlotte for their first joint appearance.

The role reversal was striking. She spoke first as the president sat behind her, arms crossed, listening, in his new role as her most high-profile surrogate. She made a reference to their bitterly fought campaign in 2008 and their political reconciliation as proof of what Americans could achieve when they come together.

The president used one of his favourite lines from his campaigning days to get the crowd "fired up and ready to go" as he told supporters he was counting on them to get Clinton to the White House. He knows that to preserve his legacy he needs her victory.

Standing on the sidelines, her aides, who had been there in the bitterly cold days of Iowa in 2008, watched almost in disbelief that their journey could have led them here.

Neither Clinton nor Obama addressed the FBI investigation into her private email set-up, but that cloud has now partly lifted and Clinton's team seemed relieved. But Republicans will use Comey's words about her email arrangement -"extremely careless" - against her at every turn.

The likely Democratic presidential nominee's use of private email has been a talking point in the election, with critics saying Mrs Clinton believes she is above the law.

Republican presidential hopeful Donald Trump called the decision "very unfair" and said it was proof that they system was rigged.

The Clinton campaign said on Tuesday that they were "glad that this matter is now resolved".

Image copyright Reuters Image caption Mrs Clinton is campaigning in North Carolina

Mrs Clinton said she had set up the email address for reasons of convenience, because it had been easier to do everything from one device than to have several phones or tablets.

She had previously said she did not knowingly send any classified material from her account.

But investigators found that 110 emails had been sent or received on Mrs Clinton's server containing classified information.

The FBI ended its investigation after agents interviewed Mrs Clinton for more than three hours over the weekend about her email habits.

The Department of Justice will ultimately decide whether to press charges, but Attorney General Loretta Lynch has said she will follow the FBI's recommendation.

Mrs Clinton's campaign says it showed that her practices were consistent with those of other secretaries of state who "also used personal email" and she was "not unique" in doing it.

However, she has apologised for using the private email system, calling it "a mistake".

"As I look back at it now, even though it was allowed, I should have used two accounts..." she said. "I'm sorry about that. I take responsibility."

What the US media are saying