Dhanigaivel Gunasekaran from Villipuram district in Tamil Nadu was identified after some Tamil community organisations posted his picture on Facebook, the Arab News reported.
Gunasekaran's photo was shared by over 8,000 people and one of the them recognised him.
The report said that Indian Consulate officials found Gunasekaran in October and referred him to a private hospital for treatment, where he was diagnosed as suffering from brain tumor and subsequent loss of memory.
Even though Saudi government's amnesty was in effect, Gunasekaran couldn't take advantage of it because of the lack of identity.
More From This Section
The Indian Consulate then roped in some Tamil community organisations.
One such organisation, Sentamil Nala Mandaram, managed to establish his identity through Facebook and also traced his family, the report said.
Gunasekaran's wife had photo copies of his visa-endorsed passport, and based on these documents, the Consulate contacted officials in India who traced the manpower agent who sent Gunasekaran to Saudi Arabia.
The Indian mission paid his medical bill as also the penalty at the Passport Office in Taif and airfare to India.
Kidwai also requested the Tamil Nadu government to provide the man with medical attention on his arrival in Chennai. He has since been admitted to a hospital, the report said.