Violent protests erupted in Haryana on Friday, killing at least 29 people, after a court convicted self-styled "godman" Gurmeet Ram Rahim Singh of raping two women, angering thousands of his supporters who said he was innocent, the state chief minister said.

Singh, the head of a social welfare and spiritual group, was found guilty of raping two followers in a case dating back to 2002 at the headquarters of his Dera Sacha Sauda group in Sirsa, Haryana.

Supporters rampaged in response, attacking railway stations, petrol stations and television vans in towns across Punjab and Haryana, witnesses said.

At least 29 people were killed in Panchkula town where the court returned its verdict on Singh and more than 200 people were injured in Haryana state.

"We tried to prevent the unrest in every possible way, but the protesters were totally out of control," Haryana Chief Minister Manohar Lal told Reuters.

"All the injured are getting the best treatment in government hospitals," he said.

Dozens of cars were burning in Panchkula town while a bloodied body lay in the middle of a road. About 500 army soldiers were deployed to restore order.

"The situation is coming under control," Home Secretary Rajiv Mehrishi said in New Delhi.

Television footage showed frantic scenes outside a hospital in Panchkula, with medical staff hurriedly transferring injured patients from ambulances on to wheelchairs and stretchers. Smoke could be seen rising in another part of town.

Singh commands a following that he claims is in the millions, many of them elderly men and women in the countryside, drawn by his social welfare programmes such as medical camps and disaster relief.

The court, which held him guilty of rape, set his sentencing for Monday when there could be more protests. He faces a minimum of seven years in prison.

Singh, a burly, bearded man who has scripted and starred in his own films, had denied the charges. He had called on his followers through a video message to remain peaceful.

A.K. Dhir, one of his lawyers, said Singh was innocent and his followers had every right to express their outrage.

Protests also erupted in Punjab, New Delhi and the neighbouring state of Rajasthan. Supporters of Singh set fire to some buses and two empty train coaches in the capital.

Nearly 1,000 members of his Sacha Sauda group were detained.

A close aide of Prime Minister Narendra Modi said central and state officials had been instructed to work round the clock to restore law and order.

"The instances of violence today are deeply distressing. I strongly condemn the violence & urge everyone to maintain peace," Modi said on Twitter.

POWER OF HOLY MEN

Some Indian "holy" men can summon thousands of supporters onto the streets. Their systems of patronage and sermons are hugely popular with people who consider the government has failed them.

In 2014, the attempted arrest of another guru on murder charges ended with his followers attacking police with clubs and stones.

Television channels showed motorcycles, cars and buses in flames in Panchkula as hundreds of police personnel in riot gear watched helplessly. The mob also toppled a TV outdoor broadcasting van, while several news channels said their journalists were targeted.

Besides the rape charges, Singh is also under investigation over allegations that he convinced 400 of his male followers to undergo castration, allegations he denies.

A variety of reasons have been given for why the men agreed to castration, including promises of becoming closer to god.

Singh's two films, "Messenger of God" and its sequel, include sequences in which he fights off villains and tosses burning motorbikes into the air.

In his spiritual avatar, Singh dresses in plain white traditional clothes, giving sermons or planting trees. In the movies he dons bejewelled costumes, rides motorbikes and sends bad guys flying.