In the end, the bitter Maryland Democratic Senate primary came down to this: Representative Donna Edwards, the exemplary progressive outsider, couldn’t defeat the ultimate insider, Representative Chris Van Hollen, the well-liked scion of the state’s Democratic establishment, with ties to big party donors he forged running its congressional campaign committee. To be fair, Van Hollen’s record is nearly as progressive as Edwards’s.

Nearly as progressive—but not quite. The insurgent Edwards would have been only the second African-American woman in history to serve in the Senate. Her campaign placed that argument front and center, and in the end, Van Hollen used it against her, with allies decrying “identity politics.” But in “a message to my beloved Democratic Party,” Edwards used her fiery concession speech to warn that Democrats “cannot celebrate inclusion and diversity” while snubbing the multiracial, majority-female base that elects its leaders. “Maryland is on the verge of having an all-male delegation in a so-called progressive state,” Edwards warned. The diverse and grieving crowd of Edwards diehards roared its anger. “Let’s hear it!” an older black woman shouted from the balcony.

As Hillary Clinton rides to the Democratic nomination on the strength of African-American support—and with the backing of almost 80 percent of black women in Democratic primaries—the Democratic Party’s candidate diversity is an issue that will define the party, and may divide it, in years to come. There was a stunning racial gap in the race: Van Hollen won three-quarters of white voters, while Edwards won almost two-thirds of blacks. And among voters who supported Clinton, he beat Edwards by 13 points.

Though polls showed Edwards leading Van Hollen as recently as three weeks ago, the weight of the Democratic machine came down behind him in big and small ways in the closing days. Local elected officials who endorsed him—and he had most of them—distributed Democratic “slates” that listed him, though he was never endorsed by any official party apparatus. Powerful Maryland Representative Steny Hoyer officially stayed neutral, but was widely perceived as supporting Van Hollen. The leaders of Maryland’s House of Delegates and state Senate formally endorsed him and threw their full support behind him. “She was up against the Democratic machine, and party leaders here hate—really hate—when minority candidates try to play up the historic aspect of their candidacy,” said former state delegate Gerron Levi, a staunch Edwards backer.

But Edwards was hurt by an ad, produced by the outside group Working for Us, that hit Van Hollen for his role in negotiating a bill that forced large political groups to disclose their donors, but exempted the National Rifle Association to win the support of moderates. If, as I wrote last month, Van Hollen’s willingness to entertain entitlement changes during budget negotiations represented the downside of his transactional, bipartisan approach, his work on the so-called Disclose Act showcased his skills, as the Democratic leadership strongly supported the legislation (it passed the House, but failed in the Senate). The ad—and Edwards’s claims about the Disclose Act on the stump—rang false, because Van Hollen has a strong record on gun control. Maybe most damaging, the ad featured a shot of Obama tearing up over the 2012 Sandy Hook killings, even though the president supported the bill—and it brought the president off the sidelines in the race, with a firm demand from the White House, leaked to Politico, to take his image out of the ad. The White House later acquiesced when Van Hollen used photos of himself with the president in mailers to Baltimore and Prince Georges County, which many Edwards supporters said hurt her with black voters.

Campaign missteps like the Working for Us ad usually only matter if they confirm a preexisting storyline: in this case, that Edwards has remained an outsider not merely because of her progressive politics and integrity, but because she has sharp elbows and doesn’t always play well with others. It served the double purpose of showcasing Van Hollen’s legislative effectiveness, and making Edwards look shady. Anecdotally, I have at least three white progressive Maryland friends who were either undecided or leaning toward Edwards who were pushed to Van Hollen by that ad.

Another divisive issue was the Van Hollen campaign’s claim that Edwards was poor at “constituent services.” In a widely quoted op-ed, respected Maryland progressive Heather Mizeur wrote a searing indictment of Edwards on that score, charging she had “a consistent record of not responding to the needs of constituents” that “is akin to malpractice in our field.”

Even some Edwards advocates allowed, on background, that she could improve on that front. But the constant criticism of her constituent service record led Edwards to erupt to Buzzfeed last week that Van Hollen supporters were essentially calling her “unqualified” in a racially coded attack. And some of her white allies agreed. “There’s a long sad history of people calling black people ‘lazy,’ and that’s how this sounded to a lot of people,” said Neil Sroka of Democracy for America, which endorsed Edwards early. “This is a diverse, multiracial party, and it needs to start walking the walk and supporting leaders like Donna.”

Sroka and DFA president Jim Dean attended what was supposed to be Edwards’s victory party, at a union hall in Lanham. So did Emily’s List President Stephanie Schriock and the group’s communications director, Marcy Stech, along with three of the four Congressional Black Caucus colleagues (out of 46) who endorsed Edwards—Representatives Gwen Moore, Yvette Clarke, and Robin Kelly. Given that early numbers showed Edwards was likely headed for a loss, their choice to be there was a very deliberate show of support from progressive Democrats who realize that the party’s future lies in multiracial female representation—and that it’s not there yet, especially in the US Senate.

“They say I burned all my bridges with this endorsement, but I’m not sorry at all—I’d do it all over again knowing the result,” Moore told me after Edwards conceded. “I have lived as a poor black woman, and that voice is missing from the US Senate. I serve on the budget committee with Chris, he’s a good guy, but I’m the voice for poor black children there. But you know, there are consequences for working against the machine,” she added—and Edwards has now faced them. Eight years after the upstart lawyer, women’s advocate, union activist, and civil-rights leader defeated seven-term incumbent Al Wynn, the machine struck back. Come January, Edwards will be an outsider once again.

“Emily’s List could not be prouder of standing with Donna Edwards,” Schriock said, standing alongside Moore, who was groomed by the Democratic women’s group when she first ran for Congress in Milwaukee. The group took a lot of fire for coming out against Van Hollen—his campaign helped organize a letter from a whopping 1,011 self-described feminists blasting the group for opposing a staunch, pro-choice male Democrat. I asked Schriock if she was concerned about the blowback. “No, not at all,” she shot back, citing “a few very vocal voices,” and adding, “We’ve raised more money in this cycle than ever before.” Schriock could have chosen to attend a victory party Tuesday night—Emily’s List candidate Katie McGinty beat Joe Sestak and John Fetterman in the Pennsylvania Democratic Senate primary—so there was something poignant and symbolic in her showing up to mourn with the Edwards stalwarts.

I stood in a group of three black women and one Latina as the “party” drew to a close. All were from Baltimore, and they were proud that Edwards carried their city—though only by about 10 percent, not enough to undo Van Hollen’s margins in the rest of the state. None would go on the record, because all want careers in Maryland Democratic politics. “We have machine-type politics here,” one told me. She was also a little annoyed at President Obama for allowing Van Hollen to use his image in ads, while coming down hard on Edwards for the same thing. “It really implied an endorsement. I think it cut into her margin in Baltimore, I really do.” But they were celebrating the Baltimore City Council victory of Shannon Sneed, an African-American woman who defeated incumbent Warren Branch, the brother of Maryland House majority whip Talmadge Branch, a prominent black Van Hollen supporter. It was a small comfort on a night they watched a black woman lose the nomination to the Senate, but they were holding on to it.

As Edwards put it in her feisty “concession” speech, which ought to resound in progressive circles for a while: “You cannot sing the first and last verse of ‘Lift Every Voice and Sing’ [known as the black national anthem]. You can’t just walk across the Edmund Pettus Bridge and call that post-racial inclusion. I look at a Maryland Democratic Party that is a majority-minority party. It’s time for us to have a seat at the table.” Black women, she added, are tired of “standing on the outside propping up the Democratic Party. It’s time for us to call the question.”

Well, Donna Edwards just did that. We’ll see how the party answers.