Salazar said she was only coming forward because she was about to be "outed" in a news story concerning the alleged incident five years ago.
A spokesman for Israeli Prime Minister Benjamin Netanyahu was accused of sexual assault by New York state senate candidate Julia Salazar on Tuesday.
David Keyes was also described as a "sexual predator" who "would not stop pushing himself on me" by a Wall Street Journal reporter who went public after Salazar's statement.
Keyes, who is Netanyahu's spokesman for foreign media, denies both allegations.
Salazar, 27, said she was only coming forward because she was about to be "outed" in a news story concerning the alleged incident five years ago.
A campaign spokesman, Michael Kinnucan, told The Associated Press that Salazar was forced to go public after being contacted by a reporter from conservative website The Daily Caller.
That website ran a story Tuesday confirming it had pushed Salazar's campaign to confirm her identity as an alleged victim of sexual assault.
"Before this runs, I want to come forward and confirm that I was a victim of sexual assault by David Keyes," Salazar wrote in a statement posted on Twitter.
"I strongly believe sexual assault survivors should not be outed in this way, and am saddened by the effect this story may have on other women," she wrote.
Salazar has attracted widespread attention during her campaign as part of a new insurgent wave of Democratic Socialists attempting to topple establishment Democrats.
She is seeking to unseat Brooklyn state Sen. Martin Dilan in Thursday's Democratic primary.
That intrigue has also included criticism over inconsistencies about how she has described her background, implying that she was a working-class immigrant from Colombia when in fact she grew up in a middle-class family in Jupiter, Florida.
She has also faced questions over her identification as Jewish.
Keyes referenced the controversy over Salazar's past when responding to her allegations.
"This false accusation is made by someone who has proven to be repeatedly dishonest about her own life," he said. "This is yet another example of her dishonesty."
After Salazar posted her statement, Shayndi Raice, a news reporter with The Wall Street Journal, retweeted the message with her own comment.
"I also had a terrible encounter with David Keyes once and 100 percent believe her," Raice wrote. "I knew this would come out about him at some point."
She alleged that Keyes "kept pushing himself on me" and had "absolutely no conception of the word no."
Raice added that "I don't know that I would use the word victim about myself" because "I was able to extricate myself quickly."
"But I knew as I walked away I had encountered a predator," she added.
Raice said the alleged incident involving her occurred before Keyes worked with Netanyahu, but did not give further details about where it happened.
Keyes reportedly denied this separate allegation, saying "there was absolutely no coercion in our encounter," the Times of Israel reported, citing Israel's Army Radio.
NBC News has reached out to Keyes for a response to the second allegation.
Keyes was born in California and before his appointment to Netanyahu's team worked as the executive director of Advancing Human Rights, a New York lobby group.
He founded the website Cyberdissidents.org, which said it aimed to highlight online democratic voices in the Middle East. In 2012, the New York Times called him "a pioneer in online activism."
Kinnucan, the Salazar campaign spokesman, told the AP that Salazar first made the allegations in 2016 in a Facebook post that was visible only to friends and swiftly deleted.
Salazar's post was a reaction to Keyes getting the job of Netanyahu's spokesman for foreign media. She alleged that three years earlier, in 2013, he coerced her into a sexual act in his New York City apartment after the pair met for coffee.
This allegation against Keyes was reported by Israeli media in 2016 but Salazar was not named. Keyes denied the 2016 claims.
On Tuesday, The Daily Caller sent an email to the Salazar campaign saying it had sources alleging their candidate was the woman behind the 2016 article.
In the email, published on its website, it also referenced her deleted Facebook post.
"Why did she delete these accusations? Does she still stand by them? My deadline is in one hour," it said.
Salazar also faced controversy after reports emerged of her 2011 arrest on charges of fraudulently trying to access the bank account of the estranged wife of neighbor Keith Hernandez, the former All-Star first baseman .
The charges were never prosecuted and Salazar later sued Hernandez's wife claiming she tried to frame her in the case. Kai Hernandez settled the lawsuit for $20,000, according to the AP.
On Tuesday, the good government organization Citizens Union rescinded its support for Salazar, citing inconsistencies in her official biography — namely that she did not graduate from Columbia University, as she had claimed.
Alexander Smith reported from London; Paul Goldman from Tel Aviv.