But the success of candidates like Ms. Pressley and Ms. Ocasio-Cortez was clearly on the mind of Mr. Carper. Since his first race in 1976 he had relied on a mix of affability and political pragmatism to find success — 13 victories in 13 statewide races — in one of the country’s most lightly populated states.

He raised more than $3.5 million, airing commercials trumpeting his achievements for Delaware and boasting of all the miles he put on his Town & Country minivan — but also reminding voters of his opposition to Mr. Trump and polarizing cabinet figures such as Education Secretary Betsy DeVos.

And Mr. Carper enlisted his friend and former colleague, former Vice President Joseph R. Biden Jr., to record a radio ad and automated call on his behalf.

Most of all, he relied on the relationships he has built up in the “state of neighbors,” as Delaware politicians call it, a place small enough — with a population of about 960,000, ranking it 45th among all states — where a veteran figure like Mr. Carper can personally meet a sizable number of voters, and an even larger share of the primary electorate.

Mr. Carper is all but certain to defeat the Republican nominee, Sussex County councilman Rob Arlett, in November.

Even as he won the right to serve a fourth term, though, Mr. Carper suggested he was puzzled by the competing demands he was hearing from Delaware voters.

“I go around the state and I hear two messages: Number one is, why can’t you guys in Washington find a way to work together like we do here in Delaware?” he said after the Labor Day parade in Wilmington Monday. “But the other message is: This guy Trump is no good and you should oppose him with everything you can.”