Rep. Donna F. Edwards (D-Md.) has pulled ahead in a new poll. (Linda Davidson/The Washington Post)

Rep. Donna F. Edwards (D-Md.) has pulled ahead of Rep. Chris Van Hollen in the Democratic primary for Maryland’s open Senate seat, according to a new poll from the Baltimore Sun and the University of Baltimore.

The poll found that 34 percent of likely Democratic primary voters supported Edwards to replace retiring Sen. Barbara A. Mikulski (D), while 28 percent backed Van Hollen. When eight minor candidates were eliminated from their choices, Edwards led Van Hollen 45 percent to 35 percent.

The survey is the first in months to give Edwards an edge in the race. Several polls over the past two months have found the two candidates tied or nearly tied, with neither winning a lead outside a margin of error.

While the number of voters interviewed in each part of the state are small and therefore prone to error, they reflect earlier surveys showing Edwards with a large advantage in Baltimore and her home of Prince George’s County. Van Hollen leads in Montgomery County, the base of his congressional district.

Edwards also leads with African Americans and female voters, as she has in other recent polls. A black single mother, she has made diversity a core component of her campaign message.

“I’m the right candidate for this time because if you look at the United States Senate, there are 100 senators, there are 20 women, there are six people of color, one woman of color,” she said Saturday morning at a forum at Southern Friendship Missionary Baptist Church in Prince George’s. “When you have diverse voices . . . you make better decisions because we bring different perspectives.”

Van Hollen has argued that he is the more effective candidate for all Marylanders. He has far more endorsements from political leaders and activists in the state, including many women and African Americans.

A Washington Post-University of Maryland poll from October gave Edwards a 10-point lead, similar to the Sun survey. Soon after, Van Hollen began airing what over three months became a million dollars in advertising in the Baltimore market, and new polling found him leading the race.

Edwards, who has struggled to raise significant funds for her campaign, did not have the money to respond. But a super PAC run by the Democratic women’s group Emily’s List countered Van Hollen with its own million-dollar ad campaign in Baltimore. The group has since spent an additional $400,000 in both Baltimore and the D.C. media market and has pledged to spend a million more on ads for Edwards.

The volatile numbers suggest that all that advertising, as well as frequent visits to the Baltimore area by both candidates, has influenced voters who do not know either candidate well. For the first time in decades, voters in Maryland are choosing a Democratic Senate candidate who does not come from the Baltimore area.

Van Hollen’s campaign pointed to that same volatility as a reason to doubt the results.

“This poll is simply off,” Van Hollen spokeswoman Bridgett Frey said in a statement, adding that the results are “inconsistent” with a poll released last week showing the race neck-and-neck.

The Sun poll involved 400 likely Democratic primary voters, interviewed between March 4 and March 9. The margin of error in the Sun survey is 4.9 percentage points.

Arelis Hernández contributed to this report.