A Libyan court has handed down tough prison terms on 19 Ukrainians, three nationals from Belarus and two Russians accused of serving as mercenaries for the ousted Libyan leader Muammar Gaddafi.

One of the Russian contract soldiers, accused of being the group’s ringleader, was sentenced to life imprisonment, while the others received ten years in prison with hard labor. All the accused denied the charges, insisting they were in Libya to work in the oil industry.

The 24 men were accused of having primed ground-to-air missile batteries to target NATO warplanes supporting the revolt against Gaddafi. At the start of the trial on April 4, a military spokesman said the mercenaries also backed Gaddafi regime attacks on civilians.

The contractors, detained in late August 2011 by former rebels in Tripoli, said they had travelled to Libya of their own accord.

At first they were described as "snipers" fighting on the side of the Gaddafi regime. It later turned out the "snipers" had no weapons and nearly half of the men were older, and unsuitable for military service. Before the trial the suspects were transferred to a local police station where their confinement conditions worsened.

The Ambassadors of Ukraine and Belarus were in court for the verdict and said the men would appeal. The Russians will also appeal the verdict, Russian Foreign Ministry said in a statement on Monday.

“We will immediately take all the necessary steps, both within the legal framework and at the political level, to promote a speedy resolution of the problem and a speedy review of this obviously biased verdict,” the Russian Foreign Ministry's official spokesman Aleksandr Lukashevich said.

On April 11, Ukraine's Foreign Ministry said it believed its citizens were innocent and would fight for their release. If their convictions are upheld Kiev said it would seek to have them repatriated to serve out their sentences.