A Nigerian court has jailed two government officials who had stolen bags of rice donated to starving refugee victims of Islamist terrorists Boko Haram, before selling them.

In the first successful prosecution of its kind Umar Ibrahim and Ali Zangebe, both council politicians, were sentenced to two-year jail terms after being caught selling 180 bags of rice.

The rice was donated by the Danish Refugee Council to feed internally displaced persons in Mafa, an area of Borno state in northeast Nigeria, that has been ravaged by the fundamentalist Muslim terror group.

The UN has warned of an impending famine in the region where the transfer of food is hampered by the fundamentalist's eight-year insurgency which has forced two million people to flee their homes.

According to the Nigerian Economic and Financial Crimes Commission (EFCC) the two perpetrators were also handed a ₦1m (£2,465; $3,200) fine at the high court in Maiduguri, the Borno state capital.

The BBC reported that Umar Ibrahim, was a local government councillor, while the other man, Bulama Ali Zangebe, was a member of the camp feeding committee.

The two admitted the charges against them but told the court that the rice, which was marked as not for sale, was about to expire.

rice in Nigeria
A security guard walks across a section of the World Food Program warehouse in Maiduguri, Nigeria November 29, 2016. Picture taken November 29, 2016 REUTERS/Afolabi Sotunde

The Times reported that this was the first conviction for what is believed to be an institutionalised corruption problem in the country.

Philip Manasseh, a civil society activist, said: "What we are now seeing is the tip of the iceberg and government officials are always at the centre of it all."

It has been reported that residents of refugee camps in the state complain that officials are taking as much as a 50% cut before distributing food after removing the "not for sale" labelling.

"Their actions have made many of us go hungry for days," Usman Warabe, a resident of a refugee camp in Maiduguri. "We blame [the government] for not giving credible people to handle things because most of them are family members of top government officials."

It is estimated by the World Food Programme that there are 1.8m people are displaced across northeast Nigeria and almost 5 million people are in urgent need of food in Borno, Adamawa and Yobe.

nigeria famine
Women with food ration cards are seen in a queue at a food distribution centre at the Banki IDP camp in Borno, Nigeria April 26, 2017. REUTERS/Afolabi Sotunde

Boko Haram, which means 'Western education is a sin' are renowned for merciless killings, kidnapping civilians, mainly women and children, and forcing them to carry out suicide bombing missions in crowded areas.

The UN-agency Food and Agriculture Organisation (FAO) has warned that the crisis was likely to deteriorate between June and August this year, compounded by bad weather conditions.