Just hours after Jair Bolsonaro won Brazil’s presidential election in a landslide victory for conservatives, Carolina Zannata and her girlfriend called the closest public notary and set a date for their wedding.

Same-sex marriage has been legal in Brazil since 2013, and Ms Zannata said she and Aline Foguel had not been in a hurry to wed. But the triumph of Mr Bolsonaro – a far-right politician who once declared “I’m homophobic, with pride” – changed their calculations.

“We got scared,” Ms Zannata said. “We need to take advantage of our hard-won rights because we might not have them afterward.”

On 1 January, Mr Bolsonaro will be sworn into office, and high on his agenda is making good on his campaign pledge to defend “the true meaning of matrimony as a union between man and woman”.

Once president, he will have the power to act on his promise. His party will also become the second-largest force in the lower house of the National Congress, thanks to an outpouring of support at the ballot box in October.

Legal experts say the Supreme Court would almost certainly strike down legislation that reversed the legalisation of same-sex marriage, but it is not clear how long the process could take.

“There could be attempts to make same-sex marriage illegal, but the constitution will prevail,” said José Fernando Simão, a professor of civil rights and family law at the University of São Paulo. “It’s natural for there to be concern. This is a community that has been ultra-marginalised in the past.”

And so, in early December, Ms Zannata and Ms Foguel gathered friends and family for a simple wedding ceremony at the notary’s office, followed by a festive lunch. They joined a wave of same-sex couples rushing to the altar out of love, but also fear or in defiance of what the incoming government might do.

Four of the five ceremonies at the notary’s office that Saturday morning were same-sex marriages.

According to the notary association Arpen, the number of same-sex marriages across Brazil surged 66 per cent in November. In São Paulo, Brazil’s biggest city, there were 57 same-sex weddings in just the first 10 days of December, compared with 113 for whole month of December 2017.

Brazil election: far-right candidate Jair Bolsonaro wins Presidency Show all 8 1 /8 Brazil election: far-right candidate Jair Bolsonaro wins Presidency Brazil election: far-right candidate Jair Bolsonaro wins Presidency A man holds an inflatable figure of jailed former president Luiz Inacio Lula da Silva as supporters of far-right presidential candidate Jair Bolsonaro celebrate in front of the National Congress in Brasilia, after the former army captain won Brazil's presidential election AFP/Getty Brazil election: far-right candidate Jair Bolsonaro wins Presidency Supporters of the left-wing presidential candidate for the Workers Party (PT), Fernando Haddad, react in Rio AFP/Getty Brazil election: far-right candidate Jair Bolsonaro wins Presidency Police officers patrol the streets during a gathering of supporters of the left-wing presidential candidate for the Workers Party AFP/Getty Brazil election: far-right candidate Jair Bolsonaro wins Presidency Fernando Haddad, presidential candidate of Brazil's leftist Workers Party (PT), is kissed by his wife Ana Estela Haddad Reuters Brazil election: far-right candidate Jair Bolsonaro wins Presidency epa07128316 Supporters of Socialist candidate Fernando Haddad react after he was defeated by far-right candidate Jair Bolsonaro, in Rio de Janeiro, Brazil, 28 October 2018. With 99.4 percent of ballots counted, Bolsonaro won the second round of the elections with 55.1 percent of the votes, compared to 44.9 percent obtained by Fernando Haddad, successor of Luiz Inacio Lula da Silva and candidate of the PT, or Workers Party. EPA/JULIO CESAR GUIMARAES JULIO CESAR GUIMARAES EPA Brazil election: far-right candidate Jair Bolsonaro wins Presidency Supporters of the left-wing presidential candidate for the Workers Party (PT), Fernando Haddad, react in Rio de Janeiro, Brazil, after the far-right candidate Jair Bolsonaro won Brazil's presidential election, in Rio de Janeiro, Brazil, on October 28, 2018. - Far-right former army captain Jair Bolsonaro was elected president of Brazil on Sunday, beating leftist opponent Fernando Haddad in a runoff election after a bitter and polarized campaign. Official results gave the controversial president-elect 55.18 percent of the vote with more than 99.7 percent of the ballots counted. (Photo by Daniel RAMALHO / AFP)DANIEL RAMALHO/AFP/Getty Images DANIEL RAMALHO AFP/Getty Images Brazil election: far-right candidate Jair Bolsonaro wins Presidency Supporters of far-right presidential candidate Jair Bolsonaro, celebrate in front of the National Congress in Brasilia, after the former army captain won Brazil's presidential election, according to official results that gave him 55.7 percent of the vote, on October 28, 2018. - Far-right former army captain Jair Bolsonaro was elected president of Brazil on Sunday, beating leftist opponent Fernando Haddad in a runoff election after a bitter and polarized campaign. Official results gave the controversial president-elect 55.18 percent of the vote with more than 99.7 percent of the ballots counted. (Photo by Sergio LIMA / AFP)SERGIO LIMA/AFP/Getty Images SERGIO LIMA AFP/Getty Images Brazil election: far-right candidate Jair Bolsonaro wins Presidency Supporters of Jair Bolsonaro gather outside the Federal Police headquarters where Brazilâ€™s former President Luiz Inacio Lula da Silva is serving a prison sentence, after Bolsonaro wins the presidential race in Curitiba, Brazil October 28, 2018. REUTERS/Rodolfo Buhrer RODOLFO BUHRER REUTERS

Mr Bolsonaro, for years a minor figure in congress best known for his outbursts against women, gay people and black people, managed to turn Brazil’s rampant political corruption and violent crime into an election opportunity, billing himself as the candidate who would restore law and order.

He also won over many voters with his culturally conservative agenda. While campaigning, he accused previous left-leaning governments of distributing “gay kits” in schools, a reference to sexual education materials that he said “perverted” students.

For many in the LGBT community, the biggest fear is that Mr Bolsonaro’s fiery rhetoric has fuelled a new era of intolerance and intimidation that could potentially lead to violence.

“People now have this open homophobic discourse that they were too embarrassed to say before,” said Ms Foguel. “I’m so afraid of reliving a past that I thought we had already conquered. I’ve had panic attacks.”

The polarised elections set off a wave of politically motivated attacks, generated virulent messages on social media and even led to the creation of a computer game in which players can use an avatar of Mr Bolsonaro and kill leftists, feminists and gay people.

Ms Zannata said she had ignored the darkening mood until a video surfaced showing throngs of soccer fans of Palmeiras, a team based in São Paulo, chanting about how Mr Bolsonaro, then a candidate, would kill gay people.

Ms Zannata, a passionate Palmeiras fan, had always gone to their games, she said.

“They’re machista, but I was accepted,” she said of the other fans. “Now I’m afraid to go to the stadium.”

Sensing the possibility of a change in legal rights, Maria Berenice Dias, the Brazilian Bar Association’s head of sexual diversity, encouraged same-sex couples “who want to get married to hurry up and formalise their union before the end of the year.”

For Noah Beltramini, a transgender man, it was a moment of happiness but also just one pressing step among several. He is rushing not only to get married but also to officially change his name and gender identification, as a Supreme Court ruling earlier this year permitted.

“It wasn’t something I was worried about before,” he said. “But with Bolsonaro I feel completely vulnerable.”

In many ways, the group wedding was very traditional, with brides in white gowns, a volunteer band playing love ballads and a towering, multi-tiered cake to be devoured. But it was also clearly a political statement.

“Love doesn’t have race, colour, sex or gender,” the wedding officiant declared. “Today is the day everyone will respect your decision.”