"The law does not run separately from society. It only reflects the perception of the society." So argued India's government in making its case against the decriminalisation of homosexuality. It believed that cultural beliefs of the majority must be enshrined in the law.

But can cultural beliefs alone justify opposition to gay equality? For some (like the Indian government), culture is everything – so legal protection of rights rests at the whim of popular sentiments. For others, law is supreme – thus culture cannot stand in the way of rights that are universal. Or so goes the debate, which performs an either/or of being for or against culture.

But even though law and culture are not the same thing, they are not mutually incompatible. In fact, the law is shaped by wider social and cultural beliefs but also helps to shape them. Rights advocates must take this into account in making the case for gay equality. They must consider conflicting cultural perspectives and, where appropriate, show that these cannot justify discrimination against sexual minorities.

For example, those who lament the decline of the traditional family may be quick to lay blame on gay relationships. Some also object to same-sex marriage on the grounds that it will somehow diminish the institution of marriage. But Hayley Gorenberg, deputy legal director of Lambda Legal, responds that "people who have been kept out of this institution are very committed to it. They approach it with such care and devotion that they can do nothing but strengthen it."

It is within this context that more than 40,000 same-sex couples in the UK have opted to enter into civil partnerships. Numerous studies show that children of gay and lesbian parents are as well adjusted as those raised by heterosexual parents. None of this spells doom for marriage and society.

Appeals to cultural beliefs are also pervasive in India, where homosexuality is alleged to be "western" and against Indian values. Mayur Suresh, who represents Voices Against 377 in the legal action against India's sodomy law, explains that it is difficult to ignore such claims when judges have a tendency to defer to them.

Rather than simply hammering on about the inalienability of rights, Indian activists engage with these cultural assumptions. "The challenge posed by gay rights does not only concern the right to life, due process or non-discrimination. It also calls into question what it means to live and love in a democratic society like India," says Suresh.

Disputing the depiction of homosexuality as "un-Indian", Suresh points out that moralistic laws concerning homosexuality are a legacy of British colonialism. These "alien" laws capture neither what it means to be Indian nor what it means to be moral. Quite the contrary, argues Suresh, who likens discrimination against homosexuals to the practice of untouchability, which was made illegal when India adopted its constitution in 1950.

The Indian government rests its legal case upon cultural intolerance of homosexuality. But there is also at least some tolerance of homosexuality in contemporary India. Recent gay rights demonstrations in New Delhi and Mumbai have seen gay activists joined by heterosexual supporters. Public opinion is, therefore, not as rigid as the government makes it out to be.

Such engagement has borne fruit. The Delhi High Court recently read down the sodomy law based partly on the value of "inclusiveness" – a value "deeply ingrained in Indian society".

It is crucial to consider cultural and religious views in fighting for gay equality. Without that, we may find ourselves ill-equipped in the midst of cultural battles. Gorenberg explains: "We do make a serious attempt not to let the debate over marriage rights be set up to pit religious rights versus civil rights. We don't think that is a valid opposition."

Suresh is cautious about gay rights discourse in India being co-opted by nationalistic discourse. While Hindu, Muslim and Christian groups have voiced opposition to gay equality, the latter two have been stigmatised by some media as backward and anti-Indian. And this in the very country where homosexuality itself is alleged to be a western phenomenon.

What this reveals is that culture is ubiquitous and at conflict with itself. By engaging the tensions within it, we may be able to overcome some barriers on the way to gay equality.

• Hayley Gorenberg and Mayur Suresh recently participated in a panel discussion on "Gay Rights As Human Rights" at the University College London Faculty of Laws