At least 28 people have been killed in India as violent protests erupted after a court convicted a self-styled "godman" of raping two female followers.

Friday's verdict angered thousands of Gurmeet Ram Rahim Singh's supporters who said he was innocent.

Singh was found guilty in a case dating back to 2002 at the headquarters of his Dera Sacha Sauda group in the northern town of Sirsa.

Supporters rampaged in response, setting fire to government buildings, attacking railway stations, petrol stations and television vans in towns across the northern states of Punjab and Haryana soon after the verdict was announced, witnesses said.

Hundreds of Indian police and soldiers patrolled Panchkula, the town where the court gave its verdict on Singh, as local officials feared an outbreak of violence.

Police fired tear gas and water cannon to disperse the protesters.

The violence left at least 28 dead, including some with bullet wounds, and more than 250 injured, according to BS Sandhu, a top Haryana police official.

He said more than 1,000 of the guru's supporters had been detained in Panchkula on charges of arson and destruction of public property.

A spokesman for the guru's sect, Dera Sacha Sauda, urged his supporters to remain calm. "I just want to request everyone to maintain peace at the moment," said Dilawar Insan. "We will explore what legal options are available to us."

Dozens of cars were burning in Panchkula town while a bloodied body lay in the middle of a road.

"The [police] have updated us on the law and order situation in Panchkula... The situation is still tense, but not out of control," said federal home secretary Rajiv Mehrishi said in New Delhi.

READ MORE: Gurmeet Ram Rahim Singh convicted in 2002 rape case

A curfew was imposed in four districts in Punjab that are strongholds of the Dera Sacha Sauda group.

"There has been violence in some towns in Punjab, we are taking all measures to maintain peace," said the state chief minister Amarinder Singh.

A defence spokesman said six columns of the Indian army, amounting to about 600 men, had been deployed in Panchkula to help police and paramilitary contain violent mobs.

Security lockdown

The guru's sect claims to have some 50 million followers and campaigns for vegetarianism and against drug addiction. Singh describes his sect as a social welfare and spiritual organisation.

More than 100,000 had gathered near the court premises before the verdict

The 50-year-old leader of the Dera Sacha Sauda group was taken into custody under military escort and will be housed in a jailhouse in the nearby town of Rohtak until his sentencing on Monday.

"The court has convicted Ram Rahim Singh of rape charges," Kohal Dev Sharma, a lawyer at the court said. "Justice has finally prevailed."

Sharma said the Singh faced a minimum of seven years in prison.

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

"We all must respect the law and maintain peace," he said.

When the guru left his ashram in Sirsa early Friday for the hearing, he was accompanied by a 100-vehicle convoy.

Police had erected heavy metal barricades topped with barbed wire along main roads in the town, a quiet residential suburb of Chandigarh, which is the common capital of Haryana and Punjab states.

Officers on horseback monitored crowds near the court. Helicopters whirred overhead.

"We are prepared to deal with any situation, but are confident that adequate measures have been put in place," said BS Sandhu, a top Haryana police official, before the verdict was read.

Army soldiers planned to march later Friday through the streets to instill a sense of security, Sandhu said.

Mobile internet services had also been suspended in the states of Haryana and Punjab to stop people from spreading rumours and causing unrest, senior government official Ram Niwas said.

Train services were cancelled through the area, leading to railway delays across north India. Schools and colleges were closed.