An Indian guru with millions of followers was sentenced to life in prison on Wednesday for raping a teenage devotee on the pretext of ridding her of evil spirits, his lawyer said.

Asaram Bapu, one of Indiainfo-icon's most charismatic and controversial "godmen", was given the maximum sentence at a closed jailhouse hearing in Rajasthan state, where hundreds of police were on high alert for a backlash from his disciples.

"Asaram has been sentenced for life until death," Rajendra Singh, a lawyer for the defence team, told AFP outside the courtinfo-icon in the western city of Jodhpur.

The white-bearded guru, 77, who urges followers to live a pious life free of sexual desires, has always denied raping the then 16-year-old in 2013 during a spiritual retreat at his ashram in Jodhpur.

His lawyer said they would appeal the sentence.

Asaram is just the latest high-profile guru jailed for sex crimes, and his conviction comes as India reverberates with anger over a series of child rapes in recent weeks.

Two of the four other co-accused, including a woman, were also found guilty and were sentenced to 20 years. Two others accused in the case were acquitted.

The hearing was closed to mediainfo-icon and the prison surrounded by tight security, with thousands of police deployed across several Indian states amid fears his devotees could riot if "Bapuji" was found guilty. There were no initial reports of violence.

The woman, now 21, accused Asaram of assaulting her on the pretext of driving away evil forces.

The influential guru, who has been in custody since 2013, had called the trial a political conspiracy and refused to cooperate with a police investigation.

A perceived reluctance to bring the charismatic leader to account sparked public outrage.

The Hindu televangelist and yoga guru still commands a devoted following despite his star power fading following the rape charges and other controversies.

Asaram's followers have been accused of attacking or pressuring those who have spoken out against the guru into withdrawing their allegations.

Two close aides who turned key witnesses against him were murdered in 2014 and 2015.

Asaram is also accused of raping another devotee and involvement in the killing of two students at another of his Hindu retreats. His son is also on trial for rape.

But this conviction was the first for the spiritual preacher who once attracted huge crowds to hear his sermons.

"We argued that Asaram is not a saint," public prosecutor Pokar Ram Bishnoi told reporters after the sentencing.

Controversial 'godman'

His conviction follows weeks of revulsion and protest over the gang rape and murder of an eight-year-old and a separate assault on a teenager by a ruling party politician.

Prime Minister Narendra Modi -- who was criticised for a slow response to the crimes -- last week approved the death penalty for child rapists and vowed "to hang the people of demonic tendencies who misbehave with daughters".

"There is a government in Delhi which listens to the hearts of the people and decides on the basis of it," he told a political gathering on Wednesday.

Asaram sparked revulsion in 2013 after saying a 23-year-old student gang raped and murdered in Delhi could have averted the ordeal by begging for mercy from her attackers.

But the preacher has retained a devoted following despite his controversies.

His website boasts of many high-profile believers and admirers, including Modi and other past prime ministers.

Officials from Modi's Bharatiya Janata Party responded angrily Wednesday as the main opposition Congress party distributed photos of the prime minister alongside Asaram.

India has numerous "godmen" backed by legions of devoted followers, many from the country's rural heartland, but several have been embroiled in scandals in recent years.

Last year, a spiritual leader dubbed the "guru in bling" was jailed for 20 years for rape. His devotees went on a rampage that lasted days and left 38 dead.

In 2014, the guru Rampal Maharaj barricaded himself in his ashram guarded by devotees armed with stones, petrol bombs and other weaponsinfo-icon after a court issued a warrant for his arrest. Six people died during the siege.