US presidential hopeful Joe Biden named Senator Kamala Harris, a former rival in the White House race, as his running mate on Tuesday, marking a historic first for US women of colour.

Biden’s announcement capped a months-long search for a Democratic partner to challenge President Donald Trump in November.

Harris, who would become the US’ first female and first black vice-president if elected, is a “fearless fighter for the little guy, and one of the country’s finest public servants”, Biden, 77, said in revealing his running mate.

“I’m proud now to have her as my partner in this campaign.”

The decision, announced in typical 2020 style on social media, was a crucial moment for Biden as he aims to build a broad coalition of voters to oust Trump from the White House.

Harris, who at 55, and two decades Biden’s junior, could appeal to younger voters and women, particularly those in the suburbs who have been fleeing Trump.

The former California attorney general is the first person of Indian descent in the running mate role, and personifies the diversity seen as key to building enthusiasm for the Democratic ticket, particularly in a year marked by a historic reckoning on race.

She is the third female vice-presidential nominee for a major party, after the groundbreaking but unsuccessful runs of Democrat Geraldine Ferraro in 1984 and Republican Sarah Palin in 2008.

Hillary Clinton was the first female presidential nominee, losing to Trump in 2016.

Harris, who ran for the 2020 Democratic presidential nomination against Biden, said she was “honoured” to join the ticket and would “do what it takes” to help him win.

She tweeted: “@JoeBiden can unify the American people because he’s spent his life fighting for us. And as president, he’ll build an America that lives up to our ideals.”

For Harris, being elevated onto a presidential ticket is the political moment of a lifetime. And if they win, the telegenic but tough Californian would almost certainly become the frontrunner in the race for the 2024 or 2028 Democratic nomination.

Biden would be the oldest person to take the office, and there is broad speculation that should Biden win, he would serve one four-year term and groom his deputy to succeed him.

That puts Harris in the extraordinary position as potential flag bearer of the Democratic Party.

Biden is likely confident that Harris has the policy chops and governing experience to help lead on day one, and immediately step into the job as president if needed.

Trump poured scorn on Biden’s announcement, saying he was “surprised” at his choice given what Trump called Harris’s lacklustre performance in the Democratic nomination race.

“She did very poorly in the primaries” Trump told reporters at the White House. “And that’s like a poll.”

He went on to attack Harris for her role in the bruising confirmation hearings of Supreme Court Justice Brett Kavanaugh, calling her “the meanest, the most horrible, the most disrespectful of anybody in the US Senate”.

But Harris, who beat out nearly a dozen other women to become the running mate, has shown she can parry such blows, a cherished quality for anyone facing an onslaught of negativity from a caustic president.

Biden’s pick of Harris drew ringing endorsements from other quarters – including from Barack Obama, the US’ first black commander in chief.

“She is more than prepared for the job,” tweeted Trump’s predecessor. “This is a good day for our country. Now let’s go win this thing.”