Image copyright Getty Images

Former Texas Governor Rick Perry has dropped out of the race to be US president - the first departure among a large field of Republican candidates.

Mr Perry had recently stopped paying campaign staff in states with early contests like Iowa.

His campaign has been struggling in the polls and he failed to make the cut into the main Republican presidential debate last month.

Mr Perry also ran in 2012 but dropped out after a series of gaffes.

Without naming front-runner Donald Trump, Mr Perry warned fellow Republicans to reject hard-line stances on immigration that could alienate Hispanic Americans.

"In America, it is the content of your character that matters, not the colour of your skin," he told supporters on Friday.

Analysis: Anthony Zurcher, BBC North America Reporter

Rick Perry certainly possessed a resume to be a top-tier contender for the Republican nomination.

He was an ex-military officer from humble roots who, as governor of Texas, led the state through economic boom times. His campaign never caught fire, however, and - eventually - the campaign money dried up.

Just four years ago, in his first presidential bid, Mr Perry had widespread support and seemed a real threat to Mitt Romney for the Republican nomination. That was before poor debate performances - capped by his "oops" moment, where he forgot the third in a list of federal agencies he'd abolish - and sharp criticism for a moderate position on immigration reform that was out of step with the Republican electorate.

It seems in a crowded 2016 field, Republican voters were just not interested in giving Mr Perry a second look.

Mr Perry - who led America's second most populous state for more than a decade - was initially seen as a top-tier candidate.

However, he has been quickly eclipsed in the polls by political outsiders like Mr Trump and former neurosurgeon Ben Carson.

"We have a tremendous field, the best in a generation, so I step aside knowing our party is in good hands," he said.

Sixteen Republicans and five Democrats remain the race.