Ministry spokesperson Syed Akbaruddin said James and another Indian sailor, Vijayan, have begun their journey back to India.
"After meet between India's High Commissioner in Accra and President Gnassingbe of Togo, Captain Sunil James and Vijayan released. Now with High Commissioner K. Jeeva Sagar," the spokesperson had earlier tweeted.
James's family had been seeking his release so that he could return home for the last rites of his 11-month-old son Vivaan who died Dec 2 of septicaemia in a Mumbai hospital.
James had stopped at Togo to report an attack on his ship MT Ocean Centurion by pirates when he was arrested July 31, along with two other crew members, for allegedly aiding the pirates.
His wife Aditi and other family members had requested the Indian government to intervene and secure James's release.
Congress MP Sanjay Nirupam, who helped the family meet Prime Minister Manmohan Singh to urge the government's intervention, said he was happy at the news of James being freed.
"We are happy, it was a long battle, we have won the battle," he said.
James's family thanked the prime minister after the release.
His brother-in-law Rakesh Madappa said: "It is nothing to celebrate about. He has to perform the last rites of his son once he is back."
--IANS (Posted on 19-12-2013)