An Indian court convicted a self-styled "godman" of rape as his followers gathered to show their support.

Tens of thousands of supporters who had been waiting for hours near the court shouted in anger after the ruling was announced on Friday.

Army and paramilitary soldiers were deployed across Panchkula as police put the northern town on a security lockdown for fear that a guilty verdict could prompt violence.

The guru, who calls himself Saint Dr Gurmeet Ram Rahim Singh Ji Insan, left his ashram early in a 100-vehicle convoy to appear in court in the town of Panchkula in the north Indian state of Haryana.

He has denied the charges.

Singh, a burly, bearded man who has scripted and starred in his own films, was accused of raping two female followers in a case dating back to 2002 at the headquarters of his Dera Sacha Sauda group in the town of Sirsa.

Singh will be taken to a jail in the town of Rohtak until his sentence is announced on Monday, a prosecution lawyer said.

More than 15,000 police and soldiers were posted in and around the court where the guru appeared before a judge, as Panchkula administrators feared an outbreak of violence.

"We are prepared to deal with any situation, but are confident that adequate measures have been put in place," said B. S. Sandhu, a top Haryana police official.

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

The army was on standby.

Fears of violence

In a televised appeal before the verdict, Singh asked his supporters not to resort to violence, but some said they would not tolerate a verdict that went against their leader.

The Dera Sacha Sauda sect claims to have 50 million members. It promotes vegetarianism and campaigns against drug addiction and has taken up social causes such as organising the weddings of poor couples.

Such groups have huge followings in India. It is not unusual for leaders to have small, heavily armed private militias protecting them.

READ MORE: A dark trade - Rape videos for sale in India

Besides the rape charges, Singh was also under investigation over allegations that he convinced 400 of his male followers to undergo castration, charges 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 2014, six people were killed when followers of another religious leader, guru Rampal, fought with police who were attempting to arrest him for contempt of court.

He had repeatedly failed to appear in court in connection with a murder trial.

Indian "godmen" can summon thousands of supporters to the streets at the drop of a hat. Their systems of patronage and quasi-religious sermons are popular with people who consider the government has failed them.