A jailed 80-year-old Maoist ideologue and activist will be taken to hospital for 15 days for medical treatment following a court order.
His lawyers told the court that Varavara Rao was denied proper medical treatment in a Mumbai jail.
Mr Rao has espoused radical thinking and revolutionary ideas in his writings, and has been in jail since 2018 for allegedly inciting caste violence.
He has strongly denied the allegations.
Mr Rao's lawyer told the Bombay High Court on Wednesday that her client was "bed-ridden, has no medical attendant and has a catheter which has not been changed for three months".
"There is a reasonable apprehension that he will die in custody. I am alleging negligence on the part of the state. If the state is unable to look after him, he needs to be shifted to hospital."
The court asked the government how it could "say that we will treat him in jail" when Mr Rao was "very ill".
The court said Mr Rao should be moved to a private hospital and his treatment should be paid for by the government. It also allowed Mr Rao's family and relatives to visit him in hospital.
In July Mr Rao contracted Covid-19 in jail, and was admitted to the hospital only after his family issued a statement and held an emergency press conference alleging that he was being denied proper medical attention despite his rapidly deteriorating health. He was taken back to the prison in August.
Despite several attempts by his lawyers, Mr Rao has been consistently denied bail. And though he's been in jail for two years, the case he is charged in has not been brought to the courts.
Mr Rao is being held along with several other activists and writers under the UAPA (Unlawful Activities Prevention Act) - an anti-terrorism law that makes it almost impossible to get bail.
Police accuse them of instigating caste violence at a Dalit rally in Bhima Koregaon village in the western state of Maharashtra, of which Mumbai is the capital, on 1 January 2018.
More than 100 global intellectuals, including Noam Chomsky and Homi K Bhabha, have called for his release.