India’s highest court has banned political candidates from seeking election on the basis of religion, caste or language, in a landmark ruling that has unclear but potentially far-reaching consequences for the way Indian politics is practised.

In a split decision, the supreme court ruled on Monday that India’s constitution allowed for the free practice of faith but could “forbid interference of religions and religious beliefs with secular activity such as elections”.

An election won by soliciting votes along the lines of identity politics could be considered corrupt practice and the result set aside, the court said.

The dissenting judgment accused the majority justices of overreach and “judicial redrafting of the law”.

The ruling casts uncertainty over five upcoming elections in states where religion and caste have traditionally helped drive voters to the polls. However, some experts expressed scepticism about whether it could be enforced.

“If this judgment is taken literally, then pretty much every single party in India could be disqualified,” said Ashok Malik, a fellow at the Delhi-based Observer Research Foundation.

Indian voters, especially outside big cities, have historically been organised into “vote-banks” along religious, caste and language blocs, divisions the country’s founders considered an essential component of managing power in such an intricately diverse nation.

India’s prime minister, Narendra Modi, belongs to a party that is explicitly Hindu in character, while other parties exist to further the interests of, among others, India’s Muslims population as well as members of socially disempowered Dalit caste.

Malik said appeals to religion or caste were too deeply ingrained in Indian politics to be eradicated by a court order

“Identity is intrinsic to human society and there is political mobilisation all over the world that takes place along these lines,” he said.

“You can’t ban identity … A sweeping ban on the use of identity for political mobilisation is going to be unimplementable.”

Malik predicted the decision might initially lead to parties bringing complaints and legal cases against another. But they would soon realise they were “locked into mutually assured destruction”, he said. “Then everyone will just ignore it.”

PV Dinesh, a supreme court advocate, said the slow pace of India’s judicial system might also complicate the way the law was implemented.

“If an election takes places today, and you’re questioning whether it involved corrupt practice, that whole court process will more than than six or seven years,” he said.

“But elected terms, at the federal and municipal levels, are themselves only five years long.”

But he foresaw that politicians would find themselves caught in the net of the new guidelines. “If the general impression of the court is that they are soliciting votes in the name of religion, definitely that will be enforceable,” he said.

Monday’s decision was broadly welcomed by political leaders but members of some sectarian parties expressed reservations.

“It is a welcome move but the thing is that, as a party, if I am representing a community, I will ask for votes,” said Imtiaz Jaleel, a member of the All India Majlis-e-Ittehadul Muslimeen, a party representing Muslim Indians.

“So, if I say development in Muslims areas, and girls need to get education, will it tantamount to breach of law? Will [saying] Muslims should be given reservation or Marathas asking for reservation be a breach?”

Reservations, or affirmative-action quotas, are enshrined in India’s constitution for people from less socially powerful caste groups, but have been increasingly challenged by traditionally powerful segments of the community who argue they no longer reflect the distribution of power and wealth in India.