A Kyrgyz court released a key powerbroker from custody on Tuesday just hours after authorities announced his detention on corruption charges, with the former official offering to return millions of dollars worth of ill-gotten money.

New prime minister and acting president Sadyr Japarov, 51, has styled himself as pro-reform and tough on graft in the two weeks since he was freed from jail by supporters in post-election unrest.

One of his earliest promises was to bring to justice a notorious former customs official who was alleged to have helped funnel $700 million out of the impoverished republic.

But Rayimbek Matraimov, who has a reputation as a financier of political campaigns in the Central Asian country, was released by a court in the capital Bishkek just hours after his detention was announced by the national security committee, after offering to pay damages.

Matraimov is not allowed to leave the country, according to the court's ruling, and must seek official permission to leave his house.

People drink beverages next to a cardboard cut-out depicting Rayimbek Matraimov at an anti-corruption cafe in Bishkek in 2019
People drink beverages next to a cardboard cut-out depicting Rayimbek Matraimov at an anti-corruption cafe in Bishkek in 2019 AFP / Vyacheslav OSELEDKO

A statement from the national security committee said that the defendant had "filed a petition for cooperation and is ready to fully compensate the specified damage to the budget of the Kyrgyz Republic".

Matraimov is regarded as a key backer for political parties and presidents, including Sooronbay Jeenbekov, who resigned on Thursday, leaving power in the hands of Japarov.

The criminal activities of the former deputy customs chief cost the state around two billion som (around $25 million), the committee said in its statement.

He had already paid 80 million som into an account controlled by the committee, it added.

Supporters of Kyrgyzstan's new acting leader Sadyr Japarov releaed him from jail
Hundreds of people rallied in front of the ministry headquarters Thursday asking for the Interior Minister and city police chief to resign. AFP / VYACHESLAV OSELEDKO

Kyrgyzstan's parliament was due to meet on Wednesday to discuss dates for parliamentary and presidential elections following two weeks of unrest over legislative polls that were tainted by vote-buying allegations.

The national security committee said that Matraimov and other officials were part of "a corruption scheme established to extract shadow income during customs administration".

The scheme began in 2016, when Matraimov was still in his post, it said.

Last year he was the target of protests led by civic groups who called on authorities to investigate corruption allegations reported by media.

Jeenbekov responded that "facts" were needed in order to prosecute Matraimov.

Parties affiliated with both men were at the heart of the vote-buying allegations that saw a post-vote protest morph into clashes between protesters and police the night after the October 4 ballot.

Many observers viewed Matraimov's brief detention in cynical terms, as the new government seeks to get foreign donors on board following two weeks of turbulence.

Japarov met Tuesday with a regional representative of United Nations Secretary General Antonio Guterres and said the country had "returned to constitutional order" following the unrest.

He told the UN's Natalia Gherman that the government's priorities were fighting the coronavirus and corruption, which had "infiltrated all areas of human activity", according to state information agency Kabar.

Before his release Japarov was serving jail time for hostage-taking -- a conviction related to an incident that took place during a 2013 rally in support of the nationalisation of a key foreign-operated gold mine.

He has angrily denied suggestions aired in local media that he has his own ties to organised crime.

There has been no indication yet that key ally Russia recognises his new functions.