The master of the 32,000-dwt Ocean Centurion (built 1999) had been held in jail since July after being accused of conspiring with pirates who attacked the ship, even though James was injured in the incident.

But his family applied to a court for a release on compassionate grounds after his 11-month-old boy Vivaan died on 2 December. James has now reached Mumbai, Indian media reported.

Another seafarer from the vessel has also been released.

The tanker is operated by Union Maritime of the UK.