BARACK OBAMA had quite a lot to say about religion, and religious tolerance in particular, when he was in India earlier this week. And he put his point in almost pietistic terms, declaring: "Our nations are strongest when we see that we are all God's children, all equal in His eyes and worthy of His love. India will succeed so long as it is not splintered along the lines of religious faith..." His words were quite similar to those pronounced by President Jimmy Carter in India in 1978, albeit in a very different context. At that time, America and Soviet-friendly India were strategically estranged, and Mr Carter's speech-writers had to hunt round for friendly things to say. They settled on the fact that both countries were secular democracies, and deeply religious societies, and somehow combined the two. America's motto, Mr Carter noted, was "In God We Trust" while India's was "Truth Alone Prevails"...but such was "the commonality of fundamental values" that, in the president's view, the two countries could happily swap slogans.

In one way, the commonality goes even further. Both countries have legal systems based on the Anglo-Saxon tradition of precedent and case law, going back many centuries. And given the importance and diversity of religious practice among Indians and Americans, both countries have a huge body of jurisprudence that traces the boundaries between religion and the law of the land.

But there is one absolutely crucial difference. Because of the First Amendment bar on the establishment of any religion, American judges have to steer clear of anything that could imply passing judgement regarding the "truth-claims" of a particular faith or the interpretation of that faith. Thus in the recent Supreme Court case which upheld the right of a Muslim prisoner to grow a longish beard, the judges could evaluate the prison's claims that the beard might be a security risk, but they could not pronounce on the validity of the convict's belief that using a razor or scissors would offend his conscience.

In India, by contrast, judges love talking about religion. In his book "From Your Gods to Our Gods" Professor Marco Ventura compares the relationship of religion and law in Britain, South Africa and India, noting a swelling body of religious case law in all three countries. In India, arguably, judges have little choice but to concern themselves with faith because the country entrenches the right of different religious communities to observe different forms of family law; and as the book shows, tricky cases arise at the boundaries between different religious groups.

For example, a Hindu may convert to Islam and then claim the instant right to remarry, on grounds that his earlier Hindu marriage is non-existent under the law he now observes. In settling such cases, Indian judges have delved deep into the case law of the British Raj. But compared with their British predecessors, Indian judges have been forthright in asserting the true implications of various faiths. "It is not the object of Islam...that Hindu husbands should be encouraged to become Muslims for the purpose of evading their own personal laws," a judge ruled in a conversion case in 1995.

More recently, a court vindicated conservative Indian Catholics who demanded a bar on the use of a fresh translation of the Bible into Tamil, authorised by local bishops. The new version allegedly watered down the concept of sin. Having considered the theological arguments on both sides, the (perfectly secular) court agreed that the translation was "illegal, improper and incorrect" and in violation of Catholic canon law.

To anyone from America, France or even semi-theocratic England, it would seem astonishing that state judges would presume to delve into such metaphysical matters. But even where they try their best, it is difficult for courts to avoid entering the realm of the spiritual when that is on many people's minds. Courts have to deal with real human life, and in some places real human life is inseparable from religion. And what was America's Scopes trial of 1925, when fundamentalist Christians were pitted against advocates of evolution, if not an adjudication of a religious matter?