Openly gay Republican candidate Carl DeMaio was selected by voters as one of the top two in a blanket primary to represent California’s 52nd congressional district.

DeMaio, a former San Diego city councilman, lost a bid to become the city’s mayor in 2012.

He will now take on Democratic Representatives Scott Peters in a November vote.

According to reports, DeMaio came in just behind Peters with 35.9% of the vote, compared to 42.2%.

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.”

DeMaio eaerlier this year caused waves when he appeared in an ad alongside his partner, marching in a gay pride parade.

He says, however, that his focus lies on a platform of fiscal responsibility, job creation and congressional reform, rather than his personal background.

Despite this, he is backed by GOP gay group the Log Cabin Republicans.