WASHINGTON (AP) — An election for district attorney in the New York City borough of Queens became an unexpected proving ground in the Democratic presidential primary on Wednesday as two leading 2020 candidates offered their endorsements.

Sens. Elizabeth Warren of Massachusetts and Bernie Sanders of Vermont gave their backing to Tiffany Caban, who’s vying against six other Democrats in next week’s primary. She has an unabashedly progressive message that includes a campaign pledge to prosecute federal Immigration and Customs Enforcement agents “who exceed their authority” to detain residents of the borough who are in the U.S. illegally.

The imprimatur of Warren and Sanders could give a boost to Caban, a 31-year-old public defender who’s seen as an underdog in her race. But the engagement of presidential candidates in a local district attorney’s race illustrates the political influence of Rep. Alexandria Ocasio-Cortez, the 29-year-old congressional Democratic star who represents part of Queens and gave her support to Caban last month. Warren and Sanders would reap their own advantages in the primary by winning Ocasio-Cortez’s endorsement, and both senators have touted alliances with her on specific issues as they court liberal voters.

Warren announced her endorsement Wednesday with a tweet that said Caban “will fight for working families and work to end mass incarceration,” while Sanders announced his endorsement soon afterward. Sanders’ campaign manager, Faiz Shakir, said in an interview that the senator “had a great conversation” with Caban on Tuesday “and had a lot of things to agree on” with regards to criminal justice reform but heeded a request by her campaign to hold off on publicly endorsing until later in the week. Our Revolution, a nonprofit group linked to Sanders, had endorsed her candidacy for district attorney in April.

Caban welcomed the backing of the two presidential hopefuls, both of whom bring large grassroots followings.

“We’re building a massive grassroots movement to decriminalize poverty and end mass incarceration — and when you have formerly incarcerated people, undocumented immigrants, sex workers and national progressive champions like Sens. Sanders and Warren coming together to support this campaign, you know change is coming,” Caban said through a spokeswoman.

Despite the Democratic star power aligning behind Caban, the Queens district attorney’s race could ultimately show the limits of Ocasio-Cortez’s burgeoning clout. Caban is competing in the June 25 Democratic primary against Melinda Katz, the current Queens borough president, and Greg Lasak, a former executive assistant district attorney of Queens, among other candidates.

Ocasio-Cortez, a first-term congresswoman who burst onto the national scene last year as she upset a veteran Democratic leader in their primary, has suggested that she may offer an endorsement in her party’s presidential race and has spoken favorably of both Warren and Sanders, whose 2016 presidential campaign she worked on. The New Yorker has been more critical of former Vice President Joe Biden, but she indicated to ABC on Sunday that she could ultimately support him if he wins the Democratic nomination to take on President Donald Trump next year.