Rep. Donna Edwards speaks after losing to Rep. Chris Van Hollen in Maryland’s Democratic primary for U.S. Senate, in Lanham on Tuesday. (Marvin Joseph/The Washington Post)

REP. DONNA Edwards, who lost Maryland’s Democratic primary for U.S. Senate on Tuesday to Rep. Chris Van Hollen, is dead right that the state and the nation are ill-served by the scarcity of women and minorities in Congress, including African American women.

It is striking that three highly qualified Democratic women — Ms. Edwards as well as two who ran in primaries to represent Maryland’s suburbs in the House of Representatives, Kathleen Matthews, a former news anchor and corporate executive, and Joseline Peña-Melnyk, a state legislator — were all defeated. If Mr. Van Hollen wins in November — he is now the heavy favorite to replace the retiring Democratic incumbent, Barbara A. Mikulski — Maryland will have an all-male congressional delegation for the first time in 30 years.

Yet in delivering a concession speech Tuesday evening accusing the Democratic Party of paying mere lip service to inclusiveness, Ms. Edwards, who is African American, is telling only part of the story. Race, gender and personal history are important factors in political campaigns; they are not the only factors.

Ms. Edwards and her biggest patron, Emily’s List, whose mission is to promote women for elective office who support abortion rights , ran an identity campaign based mainly on who Ms. Edwards is rather than what she has achieved in public office. Some of her most prominent supporters insisted that criticism of Ms. Edwards, including by this page, was racially coded.

There were several problems with that critique, not least that many prominent African American leaders, in the state and in Ms. Edwards’s congressional district, backed Mr. Van Hollen. They did so largely because of the yawning achievement gap between Mr. Van Hollen, an adept lawmaker steeped in policy expertise, and Ms. Edwards, whose uncompromising liberal views limited her effectiveness.

That was apparently not lost on Maryland women, who comprised 3 in 5 Democratic primary voters. By a substantial margin, they backed Mr. Van Hollen, as did men. And while a sizable majority of African American voters did support Ms. Edwards, Mr. Van Hollen collected 37 percent of the black vote, according to exit polls.

We’d like to see more women and minorities elected to office; in Tuesday’s primaries as in previous elections, we’ve backed many such candidates. We agree it’s a discredit to Congress that just one African American woman, Carol Moseley Braun, an Illinois Democrat, has been elected to the U.S. Senate — and she left in 1999.

While nearly 1 in 5 members of the House and Senate are racial or ethnic minorities, a record, Congress remains much whiter, and with a far greater proportion of males (81 percent), than the U.S. population as a whole. Progress remains to be made, and with the right candidates, we hope it will be.