A Russian woman who made global headlines after being found living in a cave in India with her two young daughters has flown back to her country, an official told the BBC.

Nina Kutina, 40, and her daughters - aged six and five - were rescued on July 9 by policemen on a routine patrol in a forest in the southern state of Karnataka.

The woman, who did not have valid documents to stay in India, had been sent to a foreigners' detention centre along with her daughters.

Last week, the Karnataka high court asked the federal government to issue documents to Ms. Kutina and her daughters for their return home.

They left for Russia on September 28, an official at the Foreigners' Regional Registration Office (FRRO) said. Ms. Kutina's minor son from another relationship, who was later found living in Goa state, also went with them.

The high court had been hearing a petition filed by Dror Shlomo Goldstein, an Israeli businessman living in Goa, who claimed he was the father of the two minor girls. He had sought to prevent the children from being sent back to Russia and appealed for their custody.

Mr. Goldstein has not commented on the court order yet. He can appeal against it, but it remains unclear if a favorable ruling would ensure the children stay in India.

Goldstein had previously stated that Ms. Kutina left Goa without informing him and that he had been providing for their well-being. The court found it curious that the mother and children had been discovered in a cave and questioned why they were living in such conditions.

The police discovered the family while on a patrol near Ramteertha hills in Gokarna forest, noting that brightly colored clothing was hung near the cave's entrance. Upon investigation, they found Ms. Kutina and her daughters living among meager possessions.

Though police attempted to stress the dangers of their living situation, Ms. Kutina insisted that they were happy in the cave, citing a belief that 'animals and snakes are friends' while expressing distrust of humans.

The court concluded that related legal frameworks, including the UN Convention on the Rights of the Child, did not apply in the same way due to Ms. Kutina's expressed desire to return to her home country.

The Russian embassy had provided an emergency travel window for the family, which they ultimately utilized, marking the end of a complex case intertwined with matters of family dynamics and legal obligations.