Emraan Hashmi says he cannot buy the flat of his choice in Mumbai because he is a Muslim. Nibbana, the housing society at the centre of this storm, has strongly disputed his assertion, saying the society is yet to decide, and by rushing to the media, Hashmi is using his celebrity to force the society’s hand. Hashmi is serious: He has already complained to Maharashtra’s minority rights commission, which has promised to investigate.

Hashmi’s pride is hurt, but more importantly, he has the right to buy a house. The seller has the right to decide whether or not to sell to him. But what if the decision is based on prejudice? How can law aid in forcing us to shed prejudice?

Discrimination is wrong not only because there may be laws against it, and not just because it would be politically incorrect, but also because it does not make any economic sense. A seller is better off selling his property to the highest bidder, not one speaking his language or practising his faith.

And yet, because real estate laws are so arcane in India, and because tenants have so many rights, landlords prefer to deal with their own kind. That also influences real estate ownership transactions. You trust only your kind, so you deal only with them. Result: self-selected ghettos.

It is not an urban legend that there are owners who will not let their apartments to single women. Others rule out meat eaters or those who might serve alcohol. There are colonies in Mumbai with only Parsi residents. To own an apartment at Patrakar Nagar or Sahitya Sahawas in Bandra, you need to be a journalist or an author. Hashmi won’t be able to buy a flat there, either.

Given that, some might see in Hashmi’s outburst an attempt to play the minority card when he brings up his faith—such an allegation is nearly impossible to refute. But, of course, there is such discrimination. Shabana Azmi’s is not the only such case.

It is hard to prove such discrimination, because the legal obligation not to discriminate applies to the state, not to private actors. This is because individual freedoms matter: Nobody should be forced to sell her property only to a specific buyer. And given that the transaction is between two individuals, it is fair to ask what role the cooperative society has in this, if the dues are properly paid.

And yet we do discriminate—when we hire one candidate over another, offer tenancy to one person over another, sell our flat to one person over the next.

This is not unique to Mumbai: In New York, the co-op board can decide who can rent or buy, and who cannot. They can do so because the US constitutional amendments outlaw federal discrimination; private lives are a different matter. Employment is one significant exception there that India should learn from.

If housing societies can frame rules about who can buy, can they make rules about who cannot buy? What if such exclusions are fuelled by prejudice, keeping out particular castes or faiths?

Singapore does it differently. There, the state does not want communal ghettos. So it requires that the ethnic composition in the flats it builds must be proportional—broadly—to the general population. Singapore can do it, being a city-state where four out of five Singaporeans live in government-built housing. But it is neither practical nor desirable to replicate such regimentation because it would violate an individual’s right to stay where he wants to, and another’s right to rent out property to whoever he wants.

But what if there is a persistent pattern to keep out some people? Can, or should, the state intervene (as it has warned businesses it would) unless the private sector increases hiring from scheduled castes and tribes? Companies have made a strong case of merit—which information technology firms convincingly make—until you find some companies in other sectors that routinely recruit candidates related to senior management, or belonging to the same caste or faith. Evidence from South Africa showed discrimination was wrong from an economic perspective—besides being illegal and abhorrent. But bigots are not rational.

States keen to eliminate prejudice may want to intervene in cases of discrimination among private individuals. But look at our matrimonial ads—how can anti-discrimination laws be enforced while respecting individual freedom? That is the tough conundrum.

One possibility is that practices which are in the public sphere or for a public purpose, which specifically exclude certain groups—faith, ethnicity, gender, caste, language, disabilities or sexual orientation—should be outlawed. But there should be no requirement that practices must always include all groups.

The state has absolute—and higher—responsibility. Individuals can’t be forced to be inclusive. But in excluding someone if they apply extraneous considerations, then some enforcement is necessary.

Complex, but so is life.

Salil Tripathi is a writer based in London. Your comments are welcome at salil@livemint.com