Italy's surprise decision to return two marines accused of murdering two Indian fisherman followed intense negotiations over 24 hours in which Rome secured a vow from New Delhi the two would not face the death penalty if convicted, officials said.
The marines, part of a military security team protecting a tanker from piracy in February last year, are accused of shooting the fishermen off the southern Indian state of Kerala.
They say they fired warning shots at a fishing boat believing it to be a pirate vessel.
The marines, Salvatore Girone and Massimiliano Latorre, were flying back to India on Friday on an Italian air force plane. The Italian deputy foreign minister Staffan de Mistura was travelling with them.
"We are happy with the outcome which is consistent with the dignity of Indian judicial process," Indian Prime Minister Manmohan Singh told reporters.
India and Italy have been embroiled in a sharply escalating diplomatic row over the marines, who had been allowed to leave India to vote in the Italian elections in February on condition they returned by Friday.
However, Rome informed New Delhi on March 11 that they would not be returning to stand trial.
The decision exposed Singh's fragile coalition, which governs with a minority in parliament, to damaging opposition attacks that it was too soft and had even colluded with Italy to allow the marines to leave the country.
The government, sensitive to such accusations because of the Italian roots of Congress party leader Sonia Gandhi, demanded Italy return the sailors or face a possible rupture in ties. Gandhi in turn accused her homeland of "betrayal" in going back on its word to return the marines.
India's chief justice went so far as to bar Italy's ambassador from leaving the country, a ruling that sent ripples of concern through the diplomatic community in New Delhi.
The European Union warned India it would be violating international law if it tried to enforce the decision.
The diplomatic stand-off sparked speculation the Indian government could try to bar Italian defence giant Finmeccanica from doing business in India. Indian police are investigating both Finmeccanica and its helicopter division, AgustaWestand, over corruption allegations, which the companies deny.
Behind the scenes, Italian and Indian officials were trying resolve the dispute before it escalated further.
"There have been very intensive diplomatic contacts between Italy and India during the last 24 hours," foreign ministry spokesman Syed Akbaruddin said.
Details of the negotiations have not been disclosed but Akbaruddin told Reuters that India and Italy had an agreement under which sentenced prisoners could serve jail time in their home countries.
Foreign Minister Salman Khurshid said in parliament that India had assured Italy that the marines would not face the death penalty, which only applied in the "rarest of rare cases".
"Italy falls into line," crowed one Indian television cable news channel, while cabinet minister Manish Tewari said Rome's decision to return the sailors showed that India's "gravitas is being recognised across the world".
Italian President Giorgio Napolitano called Latorre to tell him and Girone that he "appreciated the sense of responsibility demonstrated in their acceptance of the government's decision", according to a statement.