Media playback is unsupported on your device Media caption President Trump mocked Beto O'Rourke at a rally in Mississippi

US President Donald Trump has ridiculed Beto O'Rourke just hours after the Democratic presidential hopeful ended his campaign.

The president used a profanity to describe his rival and said he "quit like a dog".

Mr O'Rourke, a former Texas congressman, was highly critical of Mr Trump after a mass shooting in his hometown of El Paso in August.

He called the bloodshed a "consequence" of Mr Trump's anti-immigrant rhetoric.

On Friday Mr O'Rourke said he was quitting the race for the White House as his campaign did not have "the means to move forward successfully".

Mr Trump's response came days after he said Islamic State (IS) leader Abu Bakr al-Baghdadi had "died like a dog" during a US military operation in north-western Syria.

Media playback is unsupported on your device Media caption Beto O'Rourke: "We do not have the means to pursue this campaign successfully"

Speaking at a rally in Tupelo, Mississippi, the president branded Mr O'Rourke a "poor, pathetic guy".

What did Trump say?

"He came out of Texas a very hot political property, and he went back as cold as you can be," Mr Trump declared.

He had earlier mocked Mr O'Rourke on Twitter.

He also described former Vice-President Joe Biden, a frontrunner in the race for the Democratic nomination, as mentally deficient, and said he was "dropping like a rock".

Turning to the impeachment inquiry against him, the president said he believed an "angry majority" of American voters would support him.

The investigation was launched over allegations that Mr Trump improperly sought help from Ukraine to boost his chances of re-election, which he denies.

How did Mr O'Rourke quit?

Announcing the end of his campaign, Mr O'Rourke tweeted: "Our campaign has always been about seeing clearly, speaking honestly, and acting decisively.

"In that spirit: I am announcing that my service to the country will not be as a candidate or as the nominee."

In a blog post thanking supporters, he wrote: "We confronted institutional, systemic racism and called out Donald Trump for his white supremacy and the violence that he's encouraged against communities that don't look like, pray like or love like the majority in this country."

Democratic frontrunners tweeted their tributes to Mr O'Rourke after he stood aside.

Mr Biden said he had inspired many.

Elizabeth Warren commended his "commitment to ending gun violence", while Bernie Sanders thanked him "for running a campaign to bring millions of people together".

Who is Beto O'Rourke?

Mr O'Rourke, 47, ran for president in March after losing his 2018 bid to oust Texas Republican Senator Ted Cruz.

In that Senate race, he did better than any Democrat had in Texas for decades, running a campaign that invigorated the party nationwide and drew comparisons with former President Barack Obama.

Media playback is unsupported on your device Media caption Who is Beto O'Rourke?

His passionate delivery along with his good looks and background as a skateboarder and a punk rocker endeared him to liberals across the country.

But Mr O'Rourke struggled to carry that energy into a White House race crowded with more than 20 Democratic candidates.

As the initial buzz over his campaign began to subside, the former congressman tried to reboot his candidacy.

He began to focus on gun control, and vowed to remove assault-style weapons from private ownership, saying in one televised debate: "Hell yes, we're going to take your AR-15s."

But he could not catch up with front-runners like former Vice-President Joe Biden, Massachusetts Senator Elizabeth Warren and Vermont Senator Bernie Sanders.

As he launched his campaign, he posed on the cover of Vanity Fair, telling the magazine about the White House race: "Man, I'm just born to be in it."

He later said he regretted that move because it reinforced a "perception of privilege."

From rock star to rock bottom

In just about 12 months, Beto O'Rourke went from Democratic rock star to political rock bottom.

During his 2018 Senate race, the former Texas congressman was fundraising like a top-tier presidential candidate. Beloved by Democrats across the country for his youthful energy, his passionate stump speeches became viral sensations.

His obvious political skills in his home state did not translate on to the national stage, however, where a lack of campaign organisation and an inability to stand out on a crowded debate stage cost him dearly.

Mr O'Rourke's relatively thin CV, which wasn't a concern for Democrats when he was facing conservative stalwart Ted Cruz in Texas, was also a liability in a match-up against senators and a former vice-president with extensive experience and in-depth policy knowledge.

Some presidential hopefuls can run unsuccessful campaigns and end up with an elevated stature among party faithful - with more political prospects than when they began. Mr O'Rourke, whose campaign started high and trended only downward, was not so fortunate. He may have a second act in national politics, but his 2019 effort will be an experience he will have to overcome, not build on.