The corruption trial of Zambia's ex-president Rupiah Banda was on Wednesday postponed to October after a former energy minister rejected claims that the onetime leader personally benefited from a $2.5 million oil deal.

Testifying as a state witness, Kenneth Konga, who served as energy minister under Banda, told the court that he had travelled to Nigeria to secure the favourable oil deal when Zambia was in desperate need of fuel.

"Issues of fuel are critical and can cause riots so we wanted something that would benefit our country," he said.

"We were in dire need of fuel and we did everything to ensure" a deal that would benefit the country, not the president, said Konga.

Banda is charged with abusing his authority in awarding the Nigerian contract. He was allegedly to benefit from the proceeds of the deal.

On Tuesday, the state's star witness Akpan Ekpene, the head of the firm which facilitated the deal, unexpectedly denied the charges in court, and denounced the trial as politically motivated.

Magistrate Joshua Banda has now adjourned the case -- which has dragged since April -- to October 21.

Banda pleaded not guilty after he was stripped of presidential immunity and arrested in March.

The 76-year-old, who led the southern African nation from 2008 to 2011, has been blocked from leaving the country three times since April. He faces a maximum of five years in prison if convicted.

Since taking office in 2011, the new government led by Michael Sata has cracked down on what it says is corruption from the previous administration.

But critics have accused the new regime of persecuting its opponents.

Several other corruption trials against Banda are pending.