CHENNAI - Thirty-five men being held in India were on Monday acquitted of illegal possession of arms while they were on a US-operated anti-piracy boat in 2013.

The six Britons, three Ukrainians, 14 Estonians and 12 Indians were given five-year jail terms by a lower court in southern India’s Tamil Nadu state in January last year.

The Indian coast guard intercepted the privately run MV Seaman Guard Ohio off the coast of Tuticorin in Tamil Nadu in October 2013.

Semi-automatic weapons and thousands of rounds of ammunition were found.

The crew were charged with not having proper paperwork to carry weapons in Indian waters, but India has faced intense diplomatic pressure over the case ever since.

R. Subramaniya Adityan, a lawyer for 19 of the crew, said after Monday’s hearing at the Madras High Court that the men “will be released after the court order reaches the prison officials on Tuesday”.

Another lawyer, R. Arumuga Ram, told AFP that efforts were being made to get the men released as early as Monday night. “Otherwise, (we) will ensure to release all of them by 6:00 am tomorrow,” he added.

But Indian authorities are still able to appeal, which could prevent the foreigners from leaving India.

Twenty-three of the men are detained in Chennai’s Puzhal prison, while the remaining 12 are at Palayamkottai Central Prison in Tirunelveli.

Yvonne McHugh, partner of one of the British men Billy Irving, told Britain’s Press Association news agency that she was “over the moon”.

“We are just waiting to hear how soon they’ll be home,” she said.

“I won’t be able to speak to him until he’s out of prison, we just want them home as soon as possible. I’m absolutely ecstatic and feel proud we’ve managed to do this after four years.”

The southern tip of India is close to major trading routes from Asia to Europe.

The MV Seaman Guard Ohio was chartered to protect ships crossing the Indian Ocean at a time of increased risk from pirate attacks.

The six Britons were former soldiers working as guards on the vessels.

The 35, except the Ukrainian captain and one Briton, were released on bail in 2014 on condition that they stayed in Chennai.

An Indian court quashed the charges against the crew in July 2014, but the Supreme Court overturned that ruling the following year.

US maritime security firm AdvanFort, which owns the Seaman Guard Ohio vessel, denied the charges, saying all firearms on board were legally purchased and properly documented.

A spokesman for British Prime Minister Theresa May said Monday that the government “has worked hard for over four years to support the men and their families and we share their happiness at the court’s decision to give a full acquittal to each of the men”.

They added that Britain was “working with the Indian authorities to discuss the next steps”.

Foreign Secretary Boris Johnson said the case had long been a “top priority” and the verdict was “fantastic news”.

“The FCO has worked tirelessly behind the scenes to reunite these men with their families,” he said.

“I hope they can return home as soon as possible.”