Indian leaders have welcomed Italy's decision to send two Italian marines back to New Delhi to face trial in connection with shooting dead two Indian fishermen last year.

A dispute over the fate of the marines had clouded relations between India and Italy. The Indian supreme court allowed the marines to return home last month to vote in the Italian election in exchange for a promise that they would return within four weeks. Italy later announced that the marines would not be coming back, and India threatened serious consequences.

The Italian government changed course on Thursday. It said it had decided to return the men after receiving a written assurance from Indian authorities that their "fundamental rights" would be respected.

The marines, Massimiliano Latorre and Salvatore Girone, agreed to the decision and were to leave immediately. Officials said they would live in the Italian embassy in New Delhi.

The move overturns a decision on 11 March by the Italian foreign ministry that the marines would not go back because the decision to try them in India violated their rights.

The marines were part of a military security team on a cargo ship when they fired at a fishing boat in February 2012, killing the two men. The marines said they mistook the fishing boat for a pirate craft.

India contends that the shooting happened in Indian waters, while Italy has said it was in international waters.

The Indian prime minister, Manmohan Singh, said on Friday that the government was "very happy" with Italy's decision. India's foreign minister, Salman Khurshid, said the relationship between the countries was back on track.