A Kenyan court on Friday overturned a 20-year jail term handed to an ivory trafficking “kingpin”, in a case that had been seen as a test of the country‘s will to take on rampant poaching.

Feisal Mohamed Ali, a Kenyan national, was sentenced in 2016 after prosecutors presented him as the head of an organised crime network that spanned African wildlife parks and buyers in Asia, the primary destination for poached ivory.

However on appeal, Mombasa High Court judge Dora Chepkwony rejected the sentence passed by the lower court in July 2016 as “unconstitutional”.

“The evidence relied on to convict the accused person has a lot of gaps and doubts,” she said.

Ali was arrested in Tanzania in 2014 in connection with two tonnes of ivory – 228 whole tusks and 74 pieces – found in a Mombasa warehouse. Authorities put the value of the ivory at $4.2m.

The Kenya Wildlife Service had hailed the “landmark” judgement against him which included a fine of $208 411.

Three months earlier Kenya carried out the largest-ever torching of ivory, including 105 tonnes from thousands of dead elephants, in a grand gesture aimed at shocking the world into stopping the slaughter of the animals.

Africa is home to between 450 000 to 500 000 elephants, but more than 30 000 are killed every year on the continent to satisfy demand for ivory in Asia, where tusks sell for around $1 000 a kilo.