Voters selected Carl DeMaio as one of the top two candidates in the blanket primary for the right to represent California's 52nd congressional district Tuesday night, moving DeMaio one step closer to becoming the first openly gay Republican elected to Congress.

The former San Diego city councilman, who lost a bid to become that city's mayor in 2012, will face off against freshman Democratic Rep. Scott Peters in November. With 99 percent of precincts reporting Tuesday, DeMaio trailed Peters with 35.9 percent of the vote to Peters' 42.2 percent. Republicans Kirk Jorgensen and Fred Simon Jr. garnered 17.9 percent and 4 percent of the vote, respectively.

Tonight's win sends a national message to the Republican Party: San Diegans are fed up and frustrated," DeMaio told supporters Tuesday. "We want the party to return to its traditional roots of standing up for personal freedoms where we allow individuals to decide social issues in the context of their own personal views on faith and family without interference from their government."

The 39-year-old DeMaio attracted attention earlier this year with an ad featuring him with his partner marching in a gay pride parade and another parodying the popular Netflix series “House of Cards.”

DeMaio has stressed his record over his personal background and is running on a platform of fiscal responsibility, job creation and congressional reform.

He been backed by groups such as the Log Cabin Republicans. And he has enjoyed high-profile fundraisers in Los Angeles and New York, as well as the support of party leaders.

Last week, DeMaio’s campaign office was broken into and vandalized, leaving the floors flooded, electrical cords cut and computers smashed.

DeMaio told Fox News’ Megyn Kelly he did not want to speculate on who was behind the attack and said he did not want the attack to take focus away from the real issues.

Fox News’ Lee Ross contributed to this report