The Indian Supreme Court has ruled that politicians cannot use religion or caste to seek votes.
"Religion has no role in electoral process, which is a secular activity," the judges said in their ruling.
The court said using religion or caste to seek votes amounted to corrupt practices under electoral laws.
The landmark ruling comes just weeks ahead of the crucial election in Uttar Pradesh state where the two issues generally dominate polls.
Assembly elections are also due in the states of Punjab, Uttarakhand, Goa and Manipur.
Monday's ruling said the relationship between man and God was an individual choice and the state was forbidden from interfering in such an activity.
The ruling was passed by a seven-judge bench headed by Chief Justice TS Thakur, although there was a difference of opinion among the judges - four supported the order while three differed with it.
The three dissenting judges said "discussion on caste, creed and religion is constitutionally protected within and outside elections and this cannot be restricted" and that the issue should be left to parliament to decide.
Caste and religion are often central to Indian elections - most parties select candidates based on their religion or caste and campaigning often involves appealing to voters on these issues.
The court was hearing a question first raised in 1990 in a court in the western state of Maharashtra, which asked whether this was legitimate in elections.