Joseph R. Biden Jr. selected Senator Kamala Harris of California as his vice-presidential running mate on Tuesday, embracing a former rival who sharply criticized him in the Democratic primaries but emerged after ending her campaign as a vocal supporter of Mr. Biden and a prominent advocate of racial-justice legislation after the death of George Floyd in late May.Ms. 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 one of their presidential tickets. She brings to the race a far more vigorous campaign style than Mr. 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.Mr. Biden announced the selection over text message and in a follow-up email 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 Ms. Harris as all but certain to attempt another run for the White House in the future. By choosing her as his political partner, Mr. Biden 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, Ms. Harris was seen throughout the vice-presidential search as among the safest choices available to Mr. Biden. She has been a reliable ally of the Democratic establishment, with flexible policy priorities that largely mirror Mr. Biden’s, and her supporters argued that she could reinforce Mr. Biden’s appeal to Black voters and women without stirring particularly vehement opposition on the right or left.While she endorsed a number of left-wing policy proposals during her presidential bid, Ms. Harris also showed a distinctly Biden-like impatience with what she characterized as the grand but impractical governing designs of some in her party.“Policy has to be relevant,” Ms. Harris said last summer in an interview with The New York Times. “That’s my guiding principle: Is it relevant? Not, ‘Is it a beautiful sonnet?’”In a Twitter post Tuesday, Ms. Harris said she was honored to join Mr. 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 Mr. Biden’s vice-presidential search, there is a certain foreordained quality to Ms. Harris’s 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 multiracial future. Ms. Harris sought to capture that sense of destiny in her own presidential campaign, announcing her candidacy on Martin Luther King Day in 2019 and paying frequent homage to Shirley Chisholm, the first Black candidate to seek a major party’s nomination.Throughout her rise, Ms. Harris has excited Democrats with a personal story that set her apart even in the diverse political melting pot that is California: she is the daughter of two immigrant academics, an Indian-American mother and a father from Jamaica. Ms. Harris was raised in Oakland and Berkeley, attended Howard University and pursued a career in criminal justice before becoming only the second Black woman ever elected to the Senate.Still, Ms. Harris was far from a shoo-in for the role of Mr. Biden’s running mate, and some of Mr. 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 Mr. Biden in the first debate of the primary season. Jill Biden, the former second lady, called Ms. Harris’s debate stage remarks a “punch to the gut” at a fund-raiser in March.In the end, however, Mr. Biden may have come to see the panache Ms. Harris displayed in that debate — when she confronted him over his past opposition to busing as a means of integrating public schools — 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, Ms. Harris maintained an ability to excite Democratic voters with the imagined prospect of a debate-stage clash between her and President Trump.Minutes after the announcement, the Biden campaign released what they called a fact sheet — “Biden-Harris: Ready to lead,” read the subject line. Perhaps in recognition of the attention paid to tensions between the Biden family and Ms. Harris surrounding the debate stage attack, the release included a section titled, “Kamala’s partnership with Joe Biden.”The document noted that she served as attorney general of California when Mr. Biden’s son, Beau, was attorney general of Delaware. “The two grew close while fighting to take on the banking industry,” read one bullet point. “Through her friendship with Beau, she got to know Joe Biden. From hearing about Kamala from Beau, to seeing her fight for others directly, Joe has long been impressed by how tough Kamala is.”Mr. Biden’s choice drew immediate praise Tuesday afternoon from some of his former rivals for the Democratic nomination. Senator Amy Klobuchar of Minnesota, herself a onetime candidate for the vice-presidential slot, called it a “historic moment” and praised Ms. Harris’s leadership, experience and character.The Trump campaign responded to Ms. Harris’s selection with a statement branding her as “proof that Joe Biden is an empty shell being filled with the extreme agenda of the radicals on the left.” Katrina Pierson, a spokeswoman for the campaign, attacked the policy stances Ms. Harris adopted during her own presidential campaign and highlighted her past attacks on Mr. Biden.“Clearly, Phony Kamala will abandon her own morals, as well as try to bury her record as a prosecutor, in order to appease the anti-police extremists controlling the Democrat Party,” Ms. Pierson said. After leaving the presidential race in December, Ms. 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.Ms. Harris is likely, however, to face some skepticism from the left — and attacks from Mr. 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.In perhaps her worst moment of the 2020 primary race, Ms. Harris during a debate appeared entirely unable to rebut searing criticism from an obscure rival, Representative Tulsi Gabbard of Hawaii, who demanded that Ms. Harris apologize for having prosecuted so many people for marijuana infractions. At other times, Ms. Harris struggled to articulate clear positions on litmus-test issues like single-payer health care.But if Mr. Biden’s selection of Ms. Harris is met with a cold shoulder by some on the left, she is likely to be embraced by Mr. Biden’s most important electoral constituency within the Democratic Party: Black voters.Indeed, his 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. Black women are among the most loyal Democratic constituencies, and without their overwhelming support Mr. Biden would have been unlikely to secure the Democratic nomination in the first place. By nominating a Black woman for national office, Mr. Biden appears to be acknowledging the immensity of that political debt.He considered at least five Black women for the job, including Susan Rice, the former national security adviser to former President Barack Obama, and Representative Karen Bass, before ultimately settling on Ms. Harris. While Mr. Biden never described race as a central criterion in his decision-making, he stressed repeatedly throughout the process that he was reviewing a highly diverse group of candidates, including Latina and Asian-American candidates.Mr. Biden faced only limited pressure from voters and Black elected officials to select an African-American running mate, and polls found that even liberals and Black voters themselves mostly believed that race should not be a factor in his decision. But the political atmosphere that took hold after the killing of Mr. Floyd in Minneapolis seemed to demand a running mate who could speak with great authority on matters of racism, law enforcement and social inequity — and there is little doubt that Ms. Harris will be called upon to do just that.Some Democratic leaders also urged Mr. Biden to choose a Black running mate for purely strategic reasons, arguing that an increase in Black turnout across the South and Midwest could improve both Mr. Biden’s chances of winning the Electoral College and his party’s odds of winning a majority in the Senate. Still, it remains an open question how much Ms. Harris will help Mr. Biden and his party in that respect: Last year, she never garnered strong support in the diverse primary states of South Carolina and Nevada, and opinion research conducted by Mr. Biden’s team in recent weeks suggested she was not especially compelling to Black voters.The question of Mr. Biden’s potential running mate was an urgent issue even for his core admirers, some of whom supported him in the Democratic primaries because they believed he could win the election but worried about whether he would be able to generate passionate enthusiasm for his candidacy. Part of Ms. Harris’s task now may be to stir the energy of Mr. Biden’s coalition in a way he has seldom managed to do himself.The immediate political impact of Ms. Harris’s selection could be relatively muted in a campaign shaped so heavily by forces of extraordinary scale, most of all a global pandemic that has claimed many tens of thousands of American lives and pushed the economy into a painful recession.Yet it has been clear for months that Mr. Biden’s vice-presidential decision would have unusually weighty implications for the Democratic Party, and for national politics in general.If he wins in November, Mr. Biden would become the oldest president ever to hold the office, and few senior Democrats believe he is likely to seek a second term that would begin after his 82nd birthday. As a result, when Democrats formally approve Ms. Harris as Mr. Biden’s running mate this month, they may well be naming her as a powerful favorite to lead their party into the 2024 presidential race.Mr. Biden’s age — 77 — also may have heightened the importance of finding a running mate with thoroughly convincing political credentials. Mr. Biden himself seemed sensitive to that reality, reiterating often that he wanted a vice president who would be ready to assume the top job immediately.“The first and most important attribute is, if something happens to me, the moment after it does, that that person is capable of taking over as President of the United States of America,” he said at a fund-raiser in May.The vice-presidential search was at once highly public — involving tryouts on television and in online campaign events for more than half a dozen candidates — and surprisingly discreet for a campaign that has weathered a sizable number of leaks over the last 15 months.Much of the process was carried out by a committee of four trusted advisers named by Mr. Biden in late April: former Senator Christopher J. Dodd of Connecticut, Representative Lisa Blunt Rochester of Delaware, Mayor Eric Garcetti of Los Angeles and Cynthia C. Hogan, Mr. Biden’s former chief counsel.Aided by a team of lawyers, this group held interviews with a range of vice-presidential prospects and delved into their political records, personal finances and private lives before referring a smaller number of them for interviews with Mr. Biden.The field of women considered was certainly the most diverse array of vice-presidential candidates in history, beginning with a pool of more than a dozen contenders that included governors, senators, members of the House, a former United Nations ambassador, the mayor of Atlanta and a decorated combat veteran. The group included two Asian-American women and the first openly gay person elected to the Senate. Mr. Dodd in particular is said to have pressed for a large list with some unconventional names on it, to give Mr. Biden maximum flexibility in his choice.By the end of June, a smaller cluster of candidates had emerged as strong contenders, impressing the screening committee in interviews and reaching a point in the process that involved extensive document requests from Mr. Biden’s lawyers. Among that group were Ms. Harris, Senators Elizabeth Warren of Massachusetts and Tammy Duckworth of Illinois, Representative Val Demings of Florida, Gov. Michelle Lujan Grisham of New Mexico, Ms. Bass of California and Ms. Rice, the former national security adviser and United Nations ambassador.Yet more than in any other recent vice-presidential process, it was also plain enough from the start that this one would be decided by one person, and one person alone, with an unusually well-developed sense of the vice presidency and firm convictions about how to do the job right. After all, Mr. Biden is the first presidential candidate in 20 years to choose a running mate after serving as the vice president himself.On the campaign trail, Mr. Biden constantly fielded inquiries about a possible vice-presidential pick, leading him to craft a well-honed answer about his criteria. In addition to being able to assume the presidency immediately, if necessary, Mr. Biden’s running mate must be “simpatico” with him on critical issues of the day, as well as on a broader vision for how to lead the nation.Mr. Biden’s running mate should also balance him out with “some qualities that I don’t possess,” he has said.Perhaps most importantly, he has emphasized the need to select a vice president with whom he could have the same trusting, candid relationship that he had with Mr. Obama.“We disagreed on some tactical approaches,” Mr. Biden recalled at a fund-raiser in April, describing the lunches he and Mr. Obama had “where everything was on the table.” But, he went on, “It has to happen in private. You always have to have the president’s back.”Thomas Kaplan contributed reporting from Wilmington, Del.