Pacific Press via Getty Images Julia Salazar (in the white shirt) won the Democratic nomination for the New York state Senate's 18th district -- a major upset against 16-year incumbent Martin Dilan.

BROOKLYN, N.Y. ― Julia Salazar, a 27-year-old democratic socialist, was plagued by negative news coverage in the final weeks of her insurgent campaign against incumbent New York state Sen. Martin Dilan for making misleading statements about her background.

But voters in North Brooklyn on Thursday found her preferable to Dilan’s close ties to the real estate lobby, as Salazar triumphed in the Democratic primary for the New York state Senate’s 18th district seat. The voters may also have been sending a message of disgust with corruption scandals that have rocked the state Senate.

“Julia Salazar’s victory is a testament to how much her policy platform resonated with the people of North Brooklyn, some of the fastest gentrifying communities in New York City,” said Susan Kang, a leader of the New York City chapter of the Democratic Socialists of America, which endorsed Salazar, who is an active dues-paying member of the organization. “Her bold platform of fighting for tenants’ rights, immigrants and transit riders matters more than this expensive smear campaign against her, and that shows how important the issues really are.”

While these fibs made headlines, Salazar’s policy platform earned her the enthusiastic grassroots support of the Democratic Socialists of America, New York congressional candidate ― and progressive heroine ― Alexandria Ocasio-Cortez, and Cynthia Nixon, a progressive who challenged incumbent Andrew Cuomo in the state’s Democratic gubernatorial primary.

Salazar, who was born in Florida, has embraced an unapologetically progressive platform that supports single-payer health care, tuition-free public universities, better access to public transportation and establishing universal rent control.

Meanwhile, Salazar supporters criticized Dilan’s cozy relationship with the real estate lobby. Roughly 15 percent of his campaign donations have come from real estate developers or landlords ― nearly twice as much as any other state senator ― according to Gothamist.

Despite describing himself as “a champion” of tenant rights, Dilan, 67, has voted for tax breaks for his campaign contributors and has failed to pass any meaningful pro-tenant legislation.

Dilan “often says that he has a perfect record on pro-tenant legislation. ... But that’s simply false,” Salazar told Teen Vogue. “I have committed to never taking any money from the real estate lobby or from for-profit real estate developers, which stands in pretty sharp contrast” to the incumbent.

Dilan, a native of his district whose parents came from Puerto Rico, in 2008 unsuccessfully sought to overturn New York City campaign contribution laws aimed at limiting the influence of people or companies that do business with the city or seek to do so. A lawsuit filed by Dilan and a Republican city councilman was financed by real estate entities. And arguing the case for them was James Bopp, the lawyer behind Citizens United ― the landmark Supreme Court decision that allowed corporations and unions to give and spend unlimited sums of money on independent political activity.

Virtually everybody who spoke to HuffPost outside a polling place in North Brooklyn’s Bushwick neighborhood voted for Salazar.

The voters had either not heard about the controversies over the alleged misrepresentation of her personal history, or they dismissed them as politically motivated distortions.

Benjamin Perez, a longtime Bushwick resident, voted to re-elect Gov. Andrew Cuomo (D), who he believes is doing a good job for the state. He also voted for Salazar, who he heard is a strong advocate for tenants.

“The rent here is skyrocketing,” said Perez, who grew animated discussing people who cannot afford rent being turned out of the community. “There’s no rent control ― it’s like crazy.”

Elaine Tomlinson, another Bushwick Democrat who voted for Cuomo, did not know much about the race and ended up voting for Salazar because she’s a woman.

Left-wing voters immersed in the news were more familiar with the details of the accusations. But precisely because of their ideological leanings, they tended to be more skeptical of the accusations.

Salazar’s “supposed misrepresentations have themselves been misrepresented,” said Matthew Weiss, a writer who has volunteered for Salazar’s campaign. Her campaign was decentralized, he reasoned, so it was more possible for an individual volunteer to make a mistake about how to characterize her immigration background on the website.

Adriana Lemus, who works for a contractor, said she ultimately chose Salazar over Dilan because she saw Dilan as too beholden to business. Late in the race, she was disconcerted to learn about Salazar’s past opposition to abortion rights and her recent arrival in the neighborhood. But her boyfriend, a journalist, told her that the stories about Salazar were “just kind of just bad reporting. And I trust him.”

Clare Farris said Salazar’s blurring of truth bothered him. “But I would never vote for a machine candidate or a corporate Democrat,” he said.

Christopher Grande, a real estate agent, said he was simply more concerned about issues like criminal justice reform than Salazar’s personal life.

“You look at what the president gets away with ― any mistake that she has made, he makes once an hour,” Grande said.