Two Argentinians will this week become the first gay couple in Latin America to get married, following a three-year campaign that pitted politician against politician, overturned laws and angered millions of Catholics

The Beruti register office in the Palermo district of Buenos Aires will never have witnessed a marriage like it. On Tuesday, Alex Freyre and José María Di Bello, who met three years ago at a conference on HIV, will make history and divide a continent as they become Latin America's first gay married couple.

The ceremony will be a tribute to their determination as well as their love for each other, after a bitter three-year campaign which has divided a city, outraged Argentina's powerful Roman Catholic church and overturned the constitution.

Freyre and Di Bello's forthcoming nuptials have been debated on television, in churches and on the street. Hostile posters can be found on billboards across the city. But, in Di Bello's words, nothing can now prevent him and his partner becoming "husband and husband".

Not surprisingly, the marriage is already being hailed by equality activists as a significant triumph against the odds in a traditionally macho society. Argentina – and Latin America in general – is not known for a tolerance of sexual diversity, and violence against gays is an everyday occurrence.

"This marriage is bigger than José María and I," Freyre told the Observer. "It is a victory for all who face prejudice and discrimination across Latin America and the Caribbean. It is proof that at last the grip of the Catholic church is slipping across Latin America, the system that has kept gay communities silent and fearful is crumbling. What is happening on Tuesday is a strike against those attitudes that have repressed sexual rights across this continent for too long."

The most controversial marriage in Argentina's history became possible when a city court judge ruled that it was unconstitutional for civil law to stipulate that a marriage can exist only between a man and a woman. The marriage licence was granted on 16 November. Since then, the couple and their lawyers have come under virulent attack from church leaders, who have warned that the marriage could act as the catalyst for the swift decline of the continent's traditional family values.

The archbishop of Buenos Aires, Jorge Bergoglio, has publicly lashed out at the city's mayor, Mauricio Macri, who decided not to lodge an appeal against the judge's decision to grant the marriage licence. An appeal by the city government against the judge's ruling would, in effect, have overturned the judge's decision and stopped the licence being granted. Bergoglio said that, in failing to act, Macri had "gravely failed" at his task of governing.

For his part, Macri issued a statement saying that he had gone through "an important internal debate", adding: "We have to live with and accept this reality: the world is moving in this direction." He said government officials should "safeguard the right of each person to freely choose with whom they want to form a couple and be happy".

Anti-Macri posters showing two men kissing and asking "Did you vote Macri for this?" have been plastered across Buenos Aires in protest at the marriage.

Last week, as media interest in the marriage reached fever pitch, Freyre and Di Bello spent their last days as single men crisscrossing Buenos Aires from TV studio to radio station. "It's become so much bigger than us that I forget that I'm actually getting married and we haven't even arranged anything for the wedding," said Freyre.

Freyre and Di Bello, both long-term activists and HIV and equality rights campaigners, are now offering their legal team to other couples who want to win the right to marry through city courts. "What can't happen is that this becomes a one-off," said Freyre. "We may have won our battle, but we don't want to be the exception."

Campaigners are now hoping that gay and lesbian couples in other cities will extend the fight to outside the capital. Claudio Rosso, a 32-year-old psychoanalyst from the city of Rosario, believes that the marriage will send a strong message that the law is finally supporting the rights of gay people across the country. "This can change the way the gay community perceives itself," said Rosso. "It will take time for this to have an impact outside of Buenos Aires, but for the gay community in Argentina the feeling that you have the law on your side creates a feeling of positivity and optimism that things can change."

Although the new judicial ruling sets no precedent beyond this case, lawyers for the couple hope the ruling will increase pressure on lawmakers to debate a gay marriage bill currently deadlocked in Congress.

"This is just one marriage in one city in Latin America, we are very far away from this right being extended across the country, let alone the continent," said Analia Mariel Mas, the lead lawyer working with the couple.

"Recently, we travelled with a delegation of equality rights campaigners to the north of the country, and had people waving crucifixes at us as if they were seeing Satan in human form. So there needs to be a change to the national legislation to force through changes and uphold our constitutional rights. Change won't happen if we try to do this case by case."

No country in Latin America allows gay marriage, although several cities in Mexico and Uruguay have followed Buenos Aires by allowing same-sex civil unions, which grant some of the rights accorded to married heterosexual couples. Earlier this year, Freyre and Di Bello rejected offers of a civil union, arguing that only marriage would give them the same legal rights and status in the eyes of the law. "We are citizens, so we are asserting our rights as citizens," said Freyre. "We have the right to the same legal status in the eyes of the law and deserve to be given the same legal protection as heterosexual couples."

Changing articles in Argentina's civil code to allow same-sex marriage has support among deputies in President Cristina Fernández de Kirchner's ruling Peronist party, although the president herself has yet to take a stand.

The city is expecting large crowds to gather outside the register office on Tuesday, where plasma screens will broadcast the marriage ceremony. Security will be tight to deal with protesters.

In the cafes and bars of Buenos Aires, the marriage of Di Bello and Freyre has become a constant topic of conversation. The city is considered one of Latin America's "gay-friendly" cities and was the first place there to allow same-sex civil unions in 2002. But, for some, gay marriage is still a step too far.

On a corner in Palermo, close to where the wedding will take place, Bruno Cabral, a 42-year old civil engineer, sent an approving nod in the direction of a bank of anti-Macri posters. The marriage, he said, was an "abomination".

"Buenos Aires used to be a city which respected family, which respected traditional ways of life, but now look at what is happening, they are making mockery of marriage," he said. "This isn't a city I recognise any more."

Others see the marriage as a symbol of change for Argentina and for the continent. The wedding has received general support from the mainstream press, with many people expressing their approval of Freyre and Di Bello's right to marry.

"To me this marriage is perfect," said Cecilia Quiles, a 26-year-old office manager. "It is only changes like this which will move us to a place where we are all respecting each other. Those who call this marriage unnatural or wrong are living in the past. We are moving on."

Freyre and Di Bello say they will be relieved when the spotlight moves elsewhere after Tuesday's ceremony. "We have people calling us every day saying we are their heroes, people we don't know crying on the phone saying that Tuesday will be the best day of their life," said Freyre. "But we won't want to be heroes, all we wanted to do was get married. And now we've brought a little rainbow to Latin America, it's time for others to take up the banner as well and make us not the exception but the rule."