NEW YORK (AP) — Nearly a century after New York's legislature expelled all its socialist members for "disloyalty," voters in Brooklyn are sending one back to the capital after a bruising primary in which her political message was obscured by embarrassing revelations about her personal life and accusations that she embellished her biography.

Julia Salazar, 27, a member of the Democratic Socialists of America, handily beat an eight-term incumbent, Sen. Martin Dilan, Thursday in a Democratic primary.

The win allowed Salazar to join the ranks of leftist insurgents nationwide who have knocked out mainstream Democrats. It also suggested voters in her Brooklyn district were willing to look past a barrage of unflattering news reports that questioned her life story, outed her as a sexual assault victim, and — in the strangest twist — revealed that as a college student she was accused of attempted fraud by the estranged wife of baseball great Keith Hernandez.

Voters, Salazar told The Associated Press on Friday, recognized the stories as "a distraction from what the election should really be about.

"Voters really wanted to vote for the issues and for a demonstrated commitment to fighting for change," she said.

There is no Republican candidate running in the district in the general election, virtually guaranteeing her the seat.

Salazar said that going forward, she expects to be able to concentrate on issues like housing and health care without having to face further damaging stories about her past.

"I didn't see any other candidates subjected to such, to me, unreasonable scrutiny," she said.

Dilan, 67, represents a part of Brooklyn that has gone through major changes in recent years, with longtime residents pushed out by rising rents and an influx of mostly whiter, wealthier newcomers.

Salazar told supporters he hadn't done enough to help people struggling with gentrification.

On Friday, the day after his loss, Dilan congratulated Salazar and praised her.

"Ms. Salazar has shown great resolve throughout the campaign and I applaud her tenacity, especially when the world seemed to challenge her," he said in a statement. "That courage is not typical. It will no doubt come in handy in Albany."

Salazar faced criticism for telling some interviewers during her campaign that she was an immigrant from Colombia when she was actually born in Florida, for describing herself as coming from a financially struggling family, when she was comfortably middle class, and for saying she had a degree from Columbia University, which she attended but did not graduate from.

Salazar said she "inadvertently misrepresented" her family's history.

Reporters also revealed that when she was in college, Salazar was arrested after a Florida neighbor — the estranged wife of former New York Met Hernandez — accused her of trying to access her bank account.

The charges were dropped and Salazar later sued over what she said was a false and malicious report by Hernandez's wife, Kai Hernandez. Salazar eventually accepted $20,000 to settle the lawsuit.

Days before the election, a conservative news site, The Daily Caller, told the Salazar campaign it was working on a story that would identify her as a woman who had anonymously accused an aide to Israeli Prime Minister Benjamin Netanyahu of sexual assault.

Rather than be "outed," Salazar went public, saying the Netanyahu aide had bullied her into an unwanted sex act. That revelation prompted other women to come forward. The aide, who has denied the allegations, has taken a leave of absence.

Salazar said Friday that while she feared her experience would deter other women from reporting sexual abuse, "It seemed at least in the immediate term to have the opposite effect."

As for whether she'll manage to be effective in Albany, a place often deeply resistant to change, Salazar said she was hopeful of her prospects.

"The turnout that we saw yesterday was remarkable and it speaks to Democratic voters being ready to finally see progressive change in New York state," she said.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.