Joe Biden’s decision to tap Sen. Kamala Harris as his running mate effectively closes the books on Sen. Elizabeth Warren’s 2020 presidential bid, which saw the Massachusetts senator briefly emerge as the Democratic frontrunner — but then stumble in key early states like Iowa, New Hampshire, and South Carolina.

Wilnelia Rivera, the founder of Rivera Consulting, Inc., says Warren’s struggle in states with large numbers of voters of color may have given the Biden campaign pause when considering her as a vice-presidential pick.

“When you see how she performed in the South Carolina primary … versus New Hampshire, or how she performed in Texas after, [it] just doesn’t bode well for the kind of general election that we need for this race,” Rivera said.

Warren finished fifth in South Carolina, trailing Biden, Bernie Sanders, Tom Steyer, and Pete Buttigieg. In Texas she finished fourth, behind Biden, Sanders, and Mike Bloomberg.

Even if Warren’s performance had been stronger in those states, though, a Democratic ticket headed by two white people might have been a dicey political proposition at this moment in history.

“It’s a tough sell … both with the real social movement we’ve seen this summer with Black Lives Matter, and the more universal embrace of Black Lives Matter,” says Erin O’Brien, an associate professor of political science at UMass Boston.

“Even before those protests, a lot of women of color — and particularly Black women — were saying, ‘Black women are the backbone of this party, and have rarely been rewarded as such,’” O’Brien said. “If you’re getting 98 percent of the vote or 95 percent of vote from Black women … and there are so many qualified women of color for the VP slot, why not?”

Peter Ubertaccio, a political scientist and dean of Stonehill College’s May School of Arts and Sciences, agrees that demography didn’t work in Warren’s favor.

“The Democratic Party can’t … continue to survive, and appeal to such a diverse country, if it is only nominating white people to be president and vice president,” he said.

But Ubertaccio also believes Biden might have had another consideration in mind.

“Warren … is more than just a very successful, smart senator,” he said. “She’s also the leader of a political movement. And it can be a real challenge for a president to have, as their second in command, someone who leads such a powerful movement.”

After Biden’s selection of Harris was announced, Warren praised the choice on Twitter.

“I’ve known Kamala Harris for a long time — from when she took on Wall Street during the financial crisis as [California’s] Attorney General to working for the people every day as a United States Senator,” Warren wrote. “Throughout her career, she has been unafraid, and an inspiration to millions of women who see themselves in her. As our vice presidential nominee, Kamala is making history.

“She’ll be a great partner to Joe Biden in making our government a powerful force for good in the fight for social, racial, and economic justice,” Warren added. “I will do everything I can to ensure Joe Biden and Kamala Harris are elected in November … [a]nd I’m SO looking forward to seeing Kamala take on Mike Pence on the debate stage.”

Warren could still join Biden’s administration if he wins. For example, O’Brien notes, many Democrats — especially self-identified progressives — would welcome her appointment as Treasury secretary.

“Her passion is the banking industry and finance, and from a progressive standpoint that a lot of … Democrats feel like has been missing in financial regulation, especially as we hope to try to recover from COVID,” O’Brien said. “She’s tailor made for that role.”

Ubertaccio, though, cautions that joining Biden’s team might not be the best use of Warren’s clout, especially if Democrats can retake the Senate.

“Warren has spent an entire career studying and analyzing things like bankruptcy laws,” he said. “A lot of folks obviously disagree with her, but mostly on the right. Within the Democratic Party, she’s the leading intellectual on these issues … banking regulation, and inequality, and how we as a country should consider restructuring regulatory commissions.

“If she … accepts a high-profile position in a Biden administration, that would be pretty significant, because she’d then be in a place to implement and oversee a lot of the issues that she’s spent a lifetime thinking about,” he added. “But she would have to feel really confident that Joe Biden will continue to move in her direction.”

All this speculation comes with an obvious caveat: there’s no guarantee Biden will win.

Over the next three months, Rivera argues, Warren can play a key role in making that happen.

“We need more than just one messenger right now, coming from the presidential campaign — whether it’s [Harris] or others — who understand, ‘This is all out. This is all hands on deck,’” Rivera said.

“What [Warren] has done for this state, and what she has done at a national level through her presidential run, is exactly the kind of campaign that I think the Biden campaign needs to run now,” she added. “Which is: regardless of how confident you feel with one part of the electorate, it’s not enough.”

If Biden does win, but doesn’t seek reelection in 2024, Harris will be the presumptive Democratic nominee. If he doesn’t, the party could face a crowded primary like the one it experienced this election cycle.

In that scenario, might Warren, who is currently 71, seek the presidency again?

Ubertaccio doesn’t rule it out — and notes that Biden is 77.

“Clearly,” he said, “age is no longer a factor in bestowing presidential nominations.”

Warren could also seek re-election to the US Senate in 2024. In her most recent race, she easily beat Republican challenger Geoff Diehl, winning 60 percent of the vote to his 36 percent.

But Warren can also be a polarizing figure. In May 2019, the MassINC Polling Group found that almost as many Massachusetts residents viewed her unfavorably (42 percent) as favorably (43 percent).

“Warren’s support has been very consistent for most of her time in office — never super high, never super low,” MassINC Polling Group President Steve Koczela said via email. “What’s different … is she tends to get higher strong support and strong opposition, which means it would be harder to move her numbers in a big way.”

In addition, Koczela notes, recent Republican congressional hopefuls have a weak record in Massachusetts.

“But for Scott Brown’s brief stint, it’s been decades since Massachusetts sent a Republican to Congress,” he said. “Even in Republican wave years, we’ve still sent an all-blue delegation to Washington over and over again.

“In four years … that’s what I would be looking for. Do we see some signs of real partisan competition? Or is it still huge margins for the Democrat whenever there’s a contested race?”