Sen. Bernie Sanders (I-VT) scored a major victory on Thursday when the Senate passed his resolution to end U.S. involvement in the Yemen civil war — one that could help his 2020 prospects.

The Senate passed a resolution to defund America’s support for the Saudi-led efforts in the humanitarian disaster, a rare bipartisan rebuke to President Trump’s cozy relationship with Saudi Arabia.

Sanders has led on this issue for years, working closely with Sens. Mike Lee (R-UT) and Chris Murphy (D-CT) to build a bipartisan coalition to end U.S. support of the war. The result strengthens his foreign policy credentials, puts down a marker for anti-war activists in the primary and undercuts his opponents’ argument that he can’t play nice with others.

Democrats from across the ideological spectrum praised Sanders for his work on the issue.

“He is very focused on not letting the president take congressional power on war making. It should be the one that we guard most jealously, and that’s not been the case,” said Sen. Tim Kaine (D-VA), an original cosponsor of the bill and Hillary Clinton’s 2016 running mate, told TPM shortly before the vote. “I think we’ll see a very strong vote for that proposition, and I’ve been thanking him for doing it.”

Sanders declined to talk specifically about how the vote could help his White House bid — “I don’t want to get into that. Today, we’re talking about ending a war where children are starving to death,” he said.

But he told TPM that broader questions about America’s role in the world would play a key role in the next elections, as he placed the vote into the broader context of his foreign policy vision.

“The issue of war and peace is obviously an enormously important issue for the people of this country, and it has to do with whether we continue to be involved in never-ending wars, whether we spend trillions of dollars on the war on terror, or if we come up with new approaches which protect American interests, protect American lives, protect American money,” he said. “I think what is interesting about this vote, this effort, is it really is bipartisan. I hope and expect we’ll have every Democrat, and I think we’ll have a number of Republicans. I think that’s what the American people want on issue like this.”

Sanders’ bipartisan work on this effort helps to address two knocks against him from the last race. First, he’d never shown much of interest in specific foreign policy issues during his long congressional career. His campaign website didn’t even have a foreign policy website for almost six months after he joined the race last time, and past vague talking points he didn’t seem willing to engage on national security issues last election. Clinton and her team regularly hammered him as unprepared and naive when it came to foreign policy.

Sanders seems to have taken that critique to heart. Sanders hired Matt Duss, a well-respected progressive foreign policy wonk, as his top foreign policy adviser after the last race. He spent much more time formulating his thoughts on global issues and building out specific policies that match his worldview, and has given a pair of high-profile speeches laying out that worldview in the past months.

The second regular critique is that Sanders lacks major accomplishments as a lawmaker because he doesn’t work well with others. This result shows that the independent socialist not only could work with with Democrats but with Republicans like Lee on shared policy goals. That, along with his bipartisan work with Sen. John McCain (R-AZ) to improve health care for veterans, allows Sanders to highlight his ability to work with some other notoriously hard-headed lawmakers.

“One of my raps against him in years past is he’s been stubbornly unwilling to engage in foreign policy debates, but that’s obviously changed,” said Democratic strategist Jim Manley, who has both worked with and sparred with Sanders as a Senate leadership aide and later as a Clinton surrogate.

By laying down a clear marker on a key foreign policy issue, Sanders has laid claim as arguably the most established voice on the Democratic left running for president. It gives Sanders a leg up over others running to the left in the primary. And it sharply contrasts with Sanders’ more interventionist-leaning opponents — including Sanders’ current rival at the top of Democratic primary polls.

“I can’t ascribe where this is coming from, whether it’s a natural evolution or driven by politics,” said Manley. “But it certainly sets up a nice contrast between Sen. Sanders and someone like former Vice President Biden, who of course voted for the Iraq War.”

It’s unclear how much foreign policy will play a role in the 2020 campaign. But progressive activists focused on foreign policy were thrilled by the vote.

“This is the first time ever that Congress is using the War Powers Act to really stem an unauthorized war, which we think is huge. And it sets the path to potentially ending the 2001 AUMF [Authorization for Use of Military Force in Iraq] and the endless wars we’ve been in,” said Iram Ali, the foreign policy campaign director at MoveOn.Org, a leading progressive group that endorsed Sanders in 2016 but is neutral this election.

Ali pointed out that President Obama’s 2008 primary win over Clinton came largely because of his opposition to the Iraq War, and Clinton likely bled voters to Trump because he was seen by many as a less interventionist candidate. And she argued that Sanders would push other candidates to take bolder, more liberal foreign policy positions this election.

“It’s really powerful and really great to see Bernie Sanders setting the benchmarks on foreign policy,” she said. “It’s exciting to see who will be willing to meet him there and who is willing to lay out what a progressive foreign policy means.”