Twenty-two Democrats broke ranks and voted Tuesday for the resolution condemning the Obama administration for not giving Congress advance notice of the exchange of Army Sgt. Bowe Bergdahl for five Taliban prisoners.

Voting in favor of the measure offered vulnerable Democrats in tough reelection races an opportunity to distance themselves from President Obama.

The 22 Democrats were Reps. John BarrowJohn Jenkins BarrowRepublican wins Georgia secretary of state runoff to replace Kemp The most important runoff election is one you probably never heard of Our democracy can’t afford to cut legal aid services from the budget MORE (Ga.), Ami BeraAmerish (Ami) Babulal BeraDemocrats bicker over strategy on impeachment Seniors deserve access to Health Savings Accounts Democratic lawmakers support Bustos after DCCC resignations MORE (Calif.), Bruce BraleyBruce Lowell Braley2020 caucuses pose biggest challenge yet for Iowa's top pollster OPINION | Tax reform, not Trump-McConnell feuds, will make 2018 a win for GOP Ten years later, House Dems reunite and look forward MORE (Iowa), Julia BrownleyJulia Andrews BrownleyA dozen House Democrats call on EU ambassador to resign amid Ukraine scandal Katherine Clark quietly eyes leadership ascent California Democrats unveil redistricting reform bill after Supreme Court partisan gerrymandering ruling MORE (Calif.), Cheri BustosCheryl (Cheri) Lea BustosDCCC leader advises Democrats to keep messaging on impeachment 'simple' House Democratic campaign arm raises .4 million in third quarter Pelosi tells Democrats to focus on Constitution, not Trump MORE (Ill.), Jim Costa (Calif.), Henry Cuellar (Texas), Tulsi GabbardTulsi GabbardJill Stein: 'I am not a Russian spy' Trump criticizes Clinton for suggesting Jill Stein was Russian asset Yang defends Gabbard: She 'deserves much more respect' MORE (Hawaii), Pete GallegoPete Pena GallegoGOP candidate scores upset win in Texas state Senate runoff Koch group launches digital ads in tight Texas House race Iraq War vet wins Texas Dem runoff MORE (Texas), Joe GarciaJose (Joe) Antonio GarciaOvernight Defense: Biden honors McCain at Phoenix memorial service | US considers sending captured ISIS fighters to Gitmo and Iraq | Senators press Trump on ending Yemen civil war Biden pays tribute to McCain at emotional memorial service Mueller indictments: Congressional candidate asked Russian operatives for info on opponent MORE (Fla.), Dan Lipinski (Ill.), Jim MathesonJames (Jim) David MathesonTrump EPA eases standards for coal ash disposal Utah redistricting reform measure likely to qualify for ballot Trump's budget targets affordable, reliable power MORE (Utah), Mike Michaud (Maine), Patrick Murphy (Fla.), Beto O'Rourke (Texas), Gary Peters (Mich.), Collin Peterson (Minn.), Nick RahallNick Joe RahallWe shouldn't allow politics to impede disaster relief Break the cycle of partisanship with infant, child health care programs Clinton mulls role in 2018 midterms MORE (W.Va.), Raul Ruiz (Calif.), Kurt Schrader (Ore.), Kyrsten Sinema (Ariz.) and Tim Walz (Minn.).

ADVERTISEMENT

Braley is running for Senate in one of the year's most competitive races, while Michaud is running for governor of Maine.

Barrow, Gallego, Peters, Peterson, Rahall, Ruiz and Sinema are considered among the most vulnerable House incumbents.

Other Democrats, meanwhile, are centrists who tend to break with their party despite not being in especially tough races, like Cuellar and Lipinski.

Matheson is a frequent defector, but he is retiring at the end of this Congress.

During floor debate, Barrow said the Bergdahl exchange would embolden terrorist groups to kidnap Americans as a means of freeing their own members.

“Negotiating with terrorists will only weaken this nation in the future and encourage other terrorists to kidnap Americans in an attempt to extort future prisoner exchanges,” Barrow said.