Updated at 12:15 a.m.

Longtime Democratic incumbents Sen. Ed Markey and Rep. Richard Neal both cruised to victory over much younger primary challengers Tuesday, and both are almost certain to return to Washington in the next Congress.

Neal was the first Democrat to declare victory in Tuesday’s Massachusetts primaries. He is all but guaranteed his 17th term in the House, as there is no Republican on the ballot in November.

Markey will be running against Republican attorney Kevin O’Conner, who will begin the race as a massive underdog in both money and name recognition.

With concerns about voting during a pandemic and a rush of mail-in ballots, it appeared possible winners would not be determined until late in the night. But Kennedy conceded to Markey at around 10:30 p.m., and pledged his support to Markey and his campaign. Nevertheless, he told his own supporters, "We may have lost the final vote count tonight, but we built a coalition that will endure, because this collation, our coalition, is the future of the Democratic party."

"I would do this again with all of you in a heartbeat," Kennedy, 39, said.

Markey was running as the progressive in the race — to the degree there was any ideological difference between the two. Markey had championed the Green New Deal with New York Rep. Alexandria Ocasio-Cortez, who has been a hero of the progressive movement.

Markey, 74, afterwards told his supporters gathered in his hometown in Malden that "this campaign has always been about the young people of this country. ... Thank you for believing in me."

"Tonight's victory is a tribute to those young people. ... They will save us if we trust them. We must look to them, listen to them. We must follow these young people," Markey said. He also said told his young supporters to march in the streets, to run for office, and to win. "Don't just challenge the status quo: dismantle it. Take things over."

Markey's victory also marked the first loss for a Kennedy candidate in a statewide election in the political family's long, illustrious history.

The campaign had turned intensely personal in the last few weeks. At a debate in August, Markey called on Kennedy to tell his father and brother to stop supporting a Super PAC that was running negative campaign ads. Kennedy dodged that request, but instead asked Markey to condemn his supporters who he said were threatening him on social media.

Neal faced a challenge from Holyoke Mayor Alex Morse in a race that seemed early on to be an easy win for the incumbent. But progressive Democrats jumped behind Morse, and in August, allegations of sexual misconduct against him had the surprising impact of launching his campaign forward.

The state College Democrats chapter accused Morse, who is gay, of inappropriate dating behavior, including engaging with students at UMass Amherst, where he served as an adjunct instructor. Calls emerged for Morse to quit the race and he apologized for any interactions that made anyone uncomfortable. But then the allegations began to fall apart as reporters uncovered evidence that students had circulated the rumors in an effort to discredit Morse and help Neal.

Morse was suddenly the victim, and the story of a local race went national and donations poured in. The Morse campaign said it had its biggest fundraising day right after the allegations went public. Ocasio-Cortez, the fulcrum of the Democrats’ progressive wing on Congress, threw her weight behind Morse.

Massachusetts Gov. Charlie Baker, a Republican, announced on Thursday he is supporting Neal in the race.

For liberals, the knock on Neal is that he has been too incremental, and has not used his gavel on the House Ways and Means Committee to push through dramatic changes like Medicare-for-All.

"I want to thank, first of all, the people in the First Congressional district for their confidence in me and the agenda we have consistently put forward," Neal told supporters after his win Tuesday. "And it looks like a resounding victory this evening."

In other races around the state, Democratic Reps. Stephen Lynch and Seth Moulton both defeated primary challengers.

With Kennedy giving up his House seat to challenge Markey, Jesse Mermel, a former Brookline Select Board member and Jake Auchincloss, a Newton city councilor, led a pack of Democrats seeking to replace him in early returns. As of midnight, the race remained too close to call.

Nearly a million votes had already been cast by the time Primary Day rolled around, as Secretary of State William Galvin was predicting the highest voter turnout in years.