Music icon Cher marked "ONE OF THE GREATEST MOMENTS OF MY LIFE" Thursday after a Pakistani court ordered freedom for a lonely elephant named Kaavan, who had become the subject of a high-profile rights campaign backed by the US singer.

"WE HAVE JUST HEARD FROM PAKISTAN HIGH COURT KAAVAN IS FREE," Cher tweeted, adding a string of emojis and saying she felt "SICK".

"THIS IS ONE OF THE GREATEST MOMENTS OF MY LIFE," the effusive singer continued.

The Islamabad High Court has ordered wildlife officials to consult with Sri Lanka to find Kaavan a "suitable sanctuary" within 30 days, tweeted the Friends of Islamabad Zoo, which described itself as a group of citizens concerned about animal welfare at the zoo.

US singer Cher, shown here performing in Las Vegas, Nevada in 2014, has long called for Kaavan's release
US singer Cher, shown here performing in Las Vegas, Nevada in 2014, has long called for Kaavan's release GETTY IMAGES NORTH AMERICA / Ethan Miller

Outrage over treatment of Kaavan, an Asian elephant originally from Sri Lanka, went global several years ago with a petition garnering over 200,000 signatures after it emerged he was being chained at the Islamabad Zoo in Pakistan's leafy capital.

Zoo officials later said this was no longer the case, and that he just needed a new mate after his previous partner died in 2012.

But experts have told AFP previously that without a better habitat his future was bleak, even if a long-promised new mate finally arrives.

His behaviour -- including signs of distress such as bobbing his head repeatedly -- demonstrates "a kind of mental illness", Safwan Shahab Ahmad of the Pakistan Wildlife Foundation told AFP in 2016.

Pakistani elephant Kaavan is seen at the zoo in Islamabad in 2016, as activists have long called for his conditions to be improved
Pakistani elephant Kaavan is seen at the zoo in Islamabad in 2016, as activists have long called for his conditions to be improved AFP / AAMIR QURESHI

Activists said he had insufficient shelter from Islamabad's searing summer temperatures, which can rise to above 40 degrees Celsius (100 Fahrenheit).

Asian elephants can roam thousands of kilometres through deep tropical and subtropical forests, according to the World Wildlife Fund.

In contrast, Kaavan's 90 by 140 metre (100 by 150 yard) pen had almost no foliage, and only limited shade was provided.

Arriving as a one-year-old in 1985 from Sri Lanka, Kaavan was temporarily held in chains in 2002 because zookeepers were concerned about increasingly violent tendencies, but he was freed later that year after an outcry.

His mate Saheli, who arrived also from Sri Lanka in 1990, died in 2012, and in 2015 it emerged that Kaavan was regularly being chained once more -- for several hours a day.

Scores of people signed a petition sent to zoo authorities and Pakistan's then-Prime Minister Nawaz Sharif in protest.

A second petition circulated in 2016 and backed by over 200,000 animal-lovers from across the globe demanded Kaavan's release to a sanctuary.

Cher, who for years has spoken out about Kaavan's plight, tweeted her thanks to the Pakistani government, adding "it's so emotional for us that I have to sit Down".