Rep. Chris Van Hollen defeated Rep. Donna F. Edwards in Maryland's heated Democratic Senate primary. Edwards criticized the state party for ignoring women and people of color after her loss. (WUSA9)

The timing seemed perfect for Rep. Donna Edwards (D-Md.) to take the big step up to the U.S. Senate. She was a proud outsider in an outsider’s year, and an ultra-progressive just when Sen. Bernie Sanders of Vermont was pushing the Democrats to the left.

Best of all, she offered voters a two-fisted assault on the Senate’s outdated heritage as overwhelmingly male and white. She tried to keep the seat in female hands as the successor to retiring feminist icon Sen. Barbara A. Mikulski (D-Md.). And she would have been the first African American elected independently to statewide office in Maryland.

It wasn’t to be. Edwards lost in a landslide in Tuesday’s Democratic primary, as Rep. Chris Van Hollen battled back from a slump in the polls to win the nomination. He instantly became the favorite in the November general election in heavily Democratic Maryland, as well.

Van Hollen, only a sliver less liberal than Edwards on the issues, won the primary largely on his record of leadership and effectiveness dating back to his days in the state legislature, according to Maryland politicians and analysts. He also enjoyed a substantial edge in campaign funds to spend on a surge of advertising and mailings in the closing weeks.

Those pluses helped Van Hollen, who is white, cut into Edwards’s strong appeal to African Americans, especially in Prince George’s County, according to preliminary exit polls.

Before the polls closed Tuesday, top Maryland Democrats had said that Edwards needed to hold Van Hollen to less than 30 percent of the statewide black vote to win. But the exit polls showed him getting 35 percent.

In addition, despite her explicit appeals to elect her to add diversity in the Senate, Edwards lost to Van Hollen among women by 11 percentage points.

The results illustrated that racial and gender solidarity by themselves are not enough to win an election in Maryland. Many voters interviewed at the polls said they were impressed by Edwards’s personal story as a single mother who overcame societal barriers to win a House seat, but they chose Van Hollen because of what they saw as his greater record of achievement.

“It shouldn’t be about race,” said Ray Proctor, 70, a retired budget analyst who is black, after voting in Prince George’s. “We don’t go by gender. We go by progress and the work they’re doing.”

Edwards also paid a price for years of neglecting two key constituencies: her fellow leaders in the Maryland Democratic party, and her constituents in the 4th congressional district, which includes parts of Prince George’s and Anne Arundel.

Van Hollen jumped to an early lead in endorsements from Maryland’s political establishment, which could barely conceal its dislike of Edwards for her maverick ways and outspoken insistence on ideological purity.

Edwards also struggled to overcome a reputation for providing poor constituent service. She was accused of catering less to the voters who put her in office and more to national progressive organizations such as Emily’s List, which spent nearly $3 million to support her Senate bid.

In interviews with voters in Prince George’s neighborhoods that were once represented by Van Hollen but have been represented by Edwards since 2012 after redistricting, several said they knew little about Edwards but remembered Van Hollen fondly for his work for the community.

“I’ve always been a supporter of Van Hollen,” said Renee Miller, 49 a retail manager. “I think he can handle the position better.”

She added that race and gender should not be decisive.

“Just because you’re African American does not qualify you to be in the Senate,” said Miller, who is black.

Finally, Edwards and her supporters suffered a backlash for going too far in criticizing Van Hollen, analysts said. The White House took the rare step of publicly criticizing an ad by her supporters that appeared to falsely suggest that President Obama supported her because of Van Hollen’s alleged coziness with the National Rifle Association.

Voters evidently also rejected efforts by the Edwards campaign to paint Van Hollen as insufficiently liberal on issues including social security and trade.

“Edwards attacked the wrong guy — he’s so well-liked throughout the state among Democrats,” said Donald Norris, director of the School of Public Policy at the University of Maryland Baltimore County.

The Van Hollen campaign also recovered from a setback in March and early April, when Edwards had jumped to a small lead in several polls after Emily’s List paid for stepped-up television advertising in Baltimore.

Van Hollen punched back with increased spending on advertising of his own. Some of those ads appeared to have helped him in Edwards’s own district, where several voters said they had heard a lot about Van Hollen but knew little about Edwards.

“I’m very familiar with his name and the things he’s doing,” Dawn Hawkins, 55, a federal government worker, said of Van Hollen.

Asked about Edwards, who represents her in Congress, Hawkins said, “I really haven’t heard much, period.”