BUFFALO, N.Y. (AP) — India Walton, a socialist community activist, has defeated the four-term mayor of Buffalo in a Democratic primary.

The 38-year-old nurse and union leader pulled off the victory over Mayor Byron Brown with the backing of the Democratic Socialists of America in a campaign focused on affordable housing, health care and criminal justice reform.

She is all but assured to win the general election in November in the majority Democratic city. There is no Republican candidate in the race.

The Associated Press called the race Wednesday after it became clear that there weren't enough absentee ballots for Brown to overcome Walton's lead. She had declared victory Tuesday night.

“This is the work of a well-meaning group of rebels and revolutionaries that had a bold vision on what we want the future of our city to look like,” Walton told cheering supporters. “All that we are doing in this moment is claiming what is rightfully ours. We are the workers. We do the work. And we deserve a government that works with and for us."

Brown, who matched the record for the upstate city's longest-serving mayor and was endorsed by the Erie County Democratic Committee, did not immediately concede late Tuesday.

Brown was a city council member and state senator before becoming mayor.

Walton was born in Buffalo and became a working mother at 14. After earning her GED while pregnant, she went on to become a nurse in the same hospital where her twins were born.

One potential opponent for Walton in the general election, Scott Wilson, filed paperwork to appear as a candidate on an independent line, Better Buffalo, but his designating petitions are being challenged for falling short of signatures.

Election officials are expected to rule on the matter Thursday.