During the Democratic presidential debate Thursday night, Sen. Bernie Sanders admitted his 2001 vote as a member of the U.S. House of Representatives to authorize the invasion of Afghanistan was a mistake—and credited Democratic Congresswoman Barbara Lee of California for being the only lawmaker in Congress to get that decision right at the time.

The moment came after moderators cited recent reporting on the "Afghanistan Papers" by the Washington Post who published an exposé last week based on internal government documents that showed the U.S. government knowingly misled the American people about the war's progress. Sanders' rival, former vice president Joe Biden, was asked about his time in Barack Obama's White House and subsequently Sanders was asked to defend his initial vote to authorize the war when he was still serving in the U.S. House.

"Well, only one person, my good friend, Barbara Lee, was right on that issue," responded Sanders. "She was the only person in the House to vote against the war in Afghanistan. She was right. I was wrong. So was everybody else in the House."

Sanders later voted against President George W. Bush's push to invade Iraq while Biden pushed for the authorization and voted in favor of it. Sanders was elected to the U.S. Senate in 2006. Watch the exchanges:

@BernieSanders gives credit to @RepBarbaraLee on her solo stand against the war in Afghanistan: "Only one person, my good friend Barbara Lee, was right on that issue...She was right, I was wrong, and so was everyone in the House."#DemDebate pic.twitter.com/mpLnn0sccn — Alexis Goldstein ‍ (@alexisgoldstein) December 20, 2019

Anti-war advocates applauded Sanders for admitting his mistake on Afghanistan, with the Quaker-led Friends Committee on National Legislation (FCNL) saying the comment was a display of both "bravery and wisdom":

@RepBarbaraLee was the only member of the #House to vote against authorizing use of military force in Afghanistan. That took bravery and wisdom. So glad @SenSanders gave her a shout out on the #DemDebate stage for that vote! It’s time more members commit to #endingendlesswar. — FCNL Foreign Policy (@FCNLworld) December 20, 2019

Stephen Miles, executive director for Win Without War, also gave kudos to Sanders for his shout out to Lee and "pointing out that she was right in 2001 and every single other member of Congress got it wrong."

For other observers, the honesty of the admission was noted as a political rarity:

Bernie Sanders re continued ground presence of troops in Afghanistan: 'I was wrong' Politicians never ever ever say that. Ever. This guy is a fucking gem. — Aisha Ahmad (@aishaismad) December 20, 2019

While Sanders acknowledged what believes was a mistake and reiterated his call to end the nation's "endless wars" by bringing the U.S. soldiers home, Democratic rival Pete Buttigieg, the mayor of South Bend, Indiana who is also a veteran of the U.S. occupation of Afghanistan, subsequently stated his position that the U.S. had "no choice" but to invade the country in 2001.

Correction: An earlier version of this misstated the year Sanders was elected to the U.S. Senate. It was 2006, not 2002. That error has been corrected.