HAVELOCK, N.C. — They met here at the Cherry Point Marine airfield two decades ago, the start of a friendship that would be forged over hundreds of hours in the cockpit of an EA-6B Prowler warplane over the Middle East, jamming enemy radar systems. One was in the pilot’s seat and the other navigated beside him.

They are now vying for two seats next to each other once more — this time in Congress. And so on a rain-lashed afternoon, standing in a church room minutes away from the base, Scott Cooper, a lanky retired lieutenant colonel, reprised his role as wingman for his old cockpit mate and pilot, Richard Bew, two Democrats testing their military credentials in Republican swaths of North Carolina.

[Sign up for the weekly At War newsletter to receive stories about duty, conflict and consequence.]

Though he had his own campaign a district over to worry about, Mr. Cooper threw an arm around his friend and compared choosing a candidate to sizing up someone who wants to marry your child: “You’re not asking them to agree with you on all the issues,” Mr. Cooper said. “You’re asking them if they’ve got the heart and the soul to take care of your child, if they’re someone you want to follow. He’s the kind of person I want to follow.”

Mr. Bew, a wiry retired colonel with eight combat deployments, is running in a special election this summer to fill the third congressional district seat held for 13 terms by Walter Jones, a Republican who recently died. Mr. Cooper is running next year in the second district just to the west, against Representative George Holding, considered a top 2020 target by the House Democrats’ campaign arm.