Joe Biden selected Sen. Kamala Harris of California as his vice presidential running mate Tuesday, embracing a former rival who sharply criticized him in the Democratic primaries but emerged after ending her campaign as a vocal supporter of Biden and a prominent advocate of racial-justice legislation after the killing of George Floyd in late May.

Harris, 55, is the first Black woman and the first person of Indian descent to be nominated for national office by a major party, and only the fourth woman in history to be chosen for a presidential ticket. She brings to the race a far more vigorous campaign style than Biden's, including a gift for capturing moments of raw political electricity on the debate stage and elsewhere, and a personal identity and family story that many find inspiring.

Biden announced the selection over text message and in a follow-up e-mail to supporters: "Joe Biden here. Big news: I've chosen Kamala Harris as my running mate. Together, with you, we're going to beat Trump." The two are expected to appear together in Wilmington, Del., on Wednesday.

After her own presidential bid disintegrated last year, many Democrats regarded Harris as all but certain to attempt another run for the White House. By choosing her as his political partner, Biden, if he wins, may well be anointing her as the de facto leader of the party in four or eight years.

A pragmatic moderate who spent most of her career as a prosecutor, Harris was seen throughout the vice presidential search as among the safest choices available to Biden. She has been a reliable ally of the Democratic establishment, with flexible policy priorities that largely mirror Biden's, and her supporters argued that she could reinforce Biden's appeal to Black voters and women without stirring particularly vehement opposition on the right or left.

In a Twitter post Tuesday, Harris said she was honored to join Biden on the ticket. "Joe Biden can unify the American people because he's spent his life fighting for us," she wrote.

For all the complexity of Biden's vice presidential search, there is a certain foreordained quality to Harris' nomination. She has been regarded as a rising figure in Democratic politics since around the turn of the century, and as a confident representative of the country's multi­racial future.

Still, Harris was far from a shoo-in for the role of Biden's running mate, and some of Biden's advisers harbored persistent reservations about her because of her unsteady performance as a presidential candidate and the finely staged ambush she mounted against Biden in the first debate of the primary season.

In an attack that left Biden reeling, Harris outlined his history of working with right-wing Southerners in the 1970s to oppose busing as a means of integrating public schools. At the same time, Harris said, there was a little girl in California who was part of an early integrated class in her own school. "That little girl was me," she said.

Biden offered only a sputtering response and, for a few weeks, his polling numbers dived. His political advisers were incensed at what they viewed as a cynical ploy, especially as she later struggled to articulate her own position on mandated busing; Jill Biden called Harris' attack on her husband a "punch to the gut."

Biden also stumbled into an embarrassing moment with Harris at a later debate, claiming at one point that he had the support of the only Black woman ever elected to the Senate — Carol Moseley Braun — and prompting an exasperated response from Harris. "I'm right here!" she responded.

In the end, however, Biden may have come to see the panache Harris displayed in that first debate as more of a potential asset to his ticket than as a source of lingering grievance. Indeed, even in the bleaker periods of her presidential candidacy last year, Harris maintained an ability to excite Democratic voters with the imagined prospect of a debate-stage clash between her and President Donald Trump and her spirited interrogations of Trump appointees as a member of the Senate Judiciary Committee.

Republicans have long signaled that they intended to portray Biden's eventual running mate as a radical, a label they have struggled to attach to the center-left Biden. On Tuesday, Trump indicated that he was prepared to follow through on that approach, lacing into Harris over issues ranging from health care ("she's in favor of socialized medicine") to taxes ("she's very big into raising taxes") to the environment, and seeking to cast her as an ultra-liberal.

"She was my No. 1 pick," Trump claimed, suggesting that he had hoped to run against a ticket that included Harris. "She was my No. 1 draft pick. We'll see how she works out."

Mispronouncing Harris' first name, Trump also described Harris as "nasty" for her opposition to the nomination of Justice Brett Kavanaugh, using the kind of harshly derogatory language that he has routinely applied to women.

After leaving the presidential race in December, Harris turned her attention back to the Senate and found new purpose amid a wave of nationwide protests this spring against racism and police brutality. She marched beside protesters and forcefully championed proposals to overhaul policing and make lynching a federal crime, often speaking with a kind of clarity that had eluded her in the presidential primaries on economic issues like health care and taxation.

Harris is likely, however, to face some skepticism from the left — and attacks from Trump — over her record as district attorney of San Francisco and attorney general of California. She has struggled in the past to defend her handling of some highly sensitive cases, including one involving a death-row inmate seeking to obtain DNA evidence for his case, as well as her decision to defend California's death penalty in court despite her stated opposition to capital punishment.

Biden's choice reflects an emphatic recognition of the diversity of the Democratic political coalition and the foundational role that Black women in particular play within the party. Without their overwhelming support, Biden would have been unlikely to secure the Democratic nomination in the first place. By nominating a Black woman for national office, Biden appears to be acknowledging the immensity of that political debt.

He considered at least five Black women for the job, including Susan Rice, who served as the national security adviser to President Barack Obama, and Rep. Karen Bass of California, before ultimately settling on Harris.