(Reuters) - Three-term U.S. Senator Tom Carper successfully fought off a challenge from community activist Kerri Evelyn Harris in Delaware in Thursday’s Democratic primary, after spending several million dollars compared to less than $70,000 by his opponent.

Slideshow ( 2 images )

With nearly all of the votes counted, Carper was leading with about 65 percent of the vote, while Harris had about 35 percent, according to state figures.

Carper, 71, was challenged by Harris, 38, who was vying to become the first black woman and openly gay person elected by the state’s voters.

The senator is likely to win a fourth term, and faced only token opposition in Senate nominating contests in the past. But Harris drew strong support from outside groups, including Alexandria Ocasio-Cortez, who defeated incumbent Congressman Joe Crowley in a New York City nominating contest in June, and rallied for Harris.

The race was the latest test of whether voters dissatisfied with Democratic leadership would push out an incumbent in favor of a younger, more diverse candidate they see as a potentially more robust opposition to Republican President Donald Trump.

So far, such challenges have been successful in progressive Congressional seats, beginning with Ocasio-Cortez and more recently, Tuesday’s upset by Boston city councilwoman Ayanna Pressley over longtime incumbent U.S. Representative Michael Capuano.

But Delaware’s tendency to elect moderates to federal office held Thursday.

Political analysts see Carper, a moderate, as a safe win for Democrats in November. He will face Robert Arlett, a county councilman, who won the Republican primary.

Harris, an Air Force veteran, was far outspent, signaling that Carper took the challenge seriously. Her campaign’s expenditures totaled a mere $69,000, while Carper spent $3.35 million, according to the U.S. Federal Elections Commission database.

Carper was endorsed by former Vice President Joseph Biden, who served with Carper in the Senate representing Delaware.

Most of the nation’s nominating contests for this election cycle have been completed. Next week features elections where incumbent Democratic governors also face insurgents, in Rhode Island, and most notably New York, where actress Cynthia Nixon is challenging two-term incumbent Andrew Cuomo.