For more than a month, Rajeshwari, a 42-year-old temple elephant in India, lay desultorily on a patch of sand, her forelimb and femur broken and her body ravaged by sores.
An animal lover went to the court, seeking to put her down. The court said the pachyderm could be "euthanised" after the vets examined her. On Saturday afternoon, she died anyway.
Rajeshwari had led a hard life since she was sold to the temple in the southern state of Tamil Nadu in 1990. She would stand on stone floors for long hours to bless devotees and perform rituals like pouring or bringing water to the deities.
In 2004, she fell from an open truck on the way to a "rejuvenation" camp for captive elephants and broke her leg. She lived in pain ever since with a misshapen limb. Recently, she broke her femur when authorities used an earthmover to flip her and treat her. After that, say activists who visited the temple to check on her condition, the largely disabled pachyderm just wasted to death
Rajeshwari's tragic story mirrors the sorry state of many of 4,000 captive elephants in India, mostly in the states of Assam, Kerala, Rajasthan and Tamil Nadu. India, according to a World Animal Protection report, is widely considered the "birthplace of taming elephants for use by humans" - a practice which began thousands of years ago. (In comparison, India has 27,000 elephants in the wild.)
In southern India, pachyderms are rented out during religious festivals for noisy parades and processions, including weddings and shop and hotel openings. They travel long distances in open vehicles and walk on tarred roads in the scorching sun for hours. (They have often gone on the run at temple festivals and killed devotees.)
Elsewhere, chained and saddled elephants are used for rides, sometimes carting tourists up and down steep forts, or entertaining tourists who wish to touch, bathe and ride them. They are also hired by political parties for campaign processions, and by companies for promoting their goods in trade fairs. They are rented out for tourism in the national parks, used for anti-depredation squads, logging activities and lately even for begging on highways.
According to media reports, more than 70 captive elephants have died under "unnatural conditions and at a young age" in private custody in just three states - Kerala, Tamil Nadu, and Rajasthan - between 2015 and 2017. Some 12 captive elephants have died this year in Kerala alone. "Most of these deaths are due to torture, abuse, overwork or faulty management practices," says Suparna Ganguly, president of the Wildlife Rescue and Rehabilitation Centre.
It's not surprising to see why.
Lack of space and habitat to exercise and graze in natural surroundings means elephants lodged in captivity are shackled for long hours in concrete sheds with stone floors. This is enough to make the animal sick. They usually get foot rot, a condition where their feet develop abscesses and thinning pads, sometimes leading to severe infection. When outside, constant exposure to the glare of sun can affect their eyesight. Ms Ganguly blames this on "gross ignorance on part of the keepers and managers".
Then there's the poor diet. Elephants are slow eaters, and in the wild typically eat more than 100 kinds of roots, shoots, grasses, foliage and tubers. In captivity, their diets are severely restricted. In parts of northern India, for example, the animals have access only to glucose-rich dried sugarcane fodder. Vets say many of them suffer from intestinal infection, septicaemia and lung-related infections. The life expectancy of captive elephants in Kerala, according to a report, has dipped to below 40 years from 70-75 years a couple of decades ago.
There's not even enough places to shelter rescued and ailing elephants. There are five of them in India - including three private rescue centres - that house some 40 elephants, not enough considering the high population of captive animals.
Tamil Nadu holds month-long rejuvenation camps for temple elephants, where the animals can rest, get treated and interact with other elephants in a natural environment. Elephants are trucked into these camps from distant places and many elephants have had accidents resulting in deaths due to their inability to cope with road transport or because they fall down from trucks.
India's Supreme Court has outlawed the sale and exhibition of elephants at a well-known animal fair, and directed authorities to ban the use of elephants in religious functions to reduce their demand. More than 350 captive elephants in Kerala and Rajasthan are "illegal" - they don't have any ownership papers. Despite adequate laws - including a powerful animal protection law and guidelines to protect captive elephants - not enough is being done to protect them, say activists.
One reason is captive elephants are a lucrative trade. The owner of an elephant in Kerala, for example, can easily make up to 70,000 rupees ($1053; £754) for a single day's appearance at a religious festival during the busy season.
"For the first time in the history of India's captive elephant business, the murky underworld of elephant trade has been split wide open - decades of elephant trafficking, the ghastly nexus between poachers capturing young elephants and their collusion with private trade coupled with neglect, corruption and apathy on part of government departments have led to the unacceptable conditions today," says Ms Ganguly.
The top court is expected to pass further - and final orders - on protection of the mistreated elephants soon. There may be hope yet.