NEW YORK (Reuters) - Political newcomer Tiffany Caban, a progressive Democrat endorsed by U.S. Representative Alexandria Ocasio-Cortez, declared victory in a close-run primary race for district attorney in the New York City borough of Queens.

Queens District Attorney (D.A.) candidate Tiffany Caban attends the Queens District Attorney election night in the Queens borough of New York City, New York, U.S., June 25, 2019. REUTERS/Jeenah Moon

Votes were still being tallied early on Wednesday, and Caban’s rival Melinda Katz - seen as the main establishment candidate - had not conceded, the New York Post and other media reported.

But Caban, a former public defender of Puerto Rican descent, told her supporters: “We did it, y’all,” in footage of a rally posted online just after midnight.

A victory by the 31-year-old would mark a fresh signal of the growing power of the progressive wing of the Democratic Party as it pushes a populist platform across the country in the run up to the 2020 presidential election.

It also would highlight the political appeal that Ocasio-Cortez, known by her initials, AOC, has cultivated since she upset a long-time incumbent Democrat in a primary race a year ago.

Initial, unconfirmed results posted online by New York City’s Board of Elections suggested Caban had a narrow lead over Katz, an established centrist who serves as president of the Queens borough.

With 99% of polling stations reporting, Caban had nearly 40% of the vote, according to the unofficial returns.

Slideshow ( 14 images )

Katz was trailing with 38.3% of the vote, the results showed 5-1/2 hours after polls closed. Five other candidates on the ballot trailed behind and there were still 3,400 absentee ballots to be counted.

With Democrats outnumbering Republicans in Queens, the winner of Tuesday’s Democratic primary is expected to easily defeat a Republican opponent in November’s national election.

Competition for the office has been uncharacteristically fierce since Richard A. Brown, who served as district attorney for more than 25 years, announced his retirement in January. Brown died in May, a month before his scheduled departure.

The primary race in the diverse borough with working-class roots was seen as a litmus test for the appeal of progressive versus traditional candidates.

Caban, who identifies as queer, ran a grassroots campaign, raising funds from small cash contributions.

She promised to close New York’s Rikers Island jail without replacing it, to decriminalize prostitution and to end cash bail for all criminal offenses.

Her agenda gained her several high-profile endorsements, on top of Ocasio-Cortez. Bernie Sanders and Elizabeth Warren, both leading progressives in the U.S. Senate and candidates for the Democratic nomination for president both backed her.

Both Sanders and Ocasio-Cortez posted tweets congratulating Caban on the apparent win.

Sanders wrote: “This is a victory for working people everywhere who are fighting for real political change and demanding we end cash bail, mass incarceration and the failed war on drugs.”

Ocasio-Cortez wrote: “We meet a machine with a movement.”

Katz ran a campaign with strong support from local businesses and politicians including the state’s governor, Andrew Cuomo.