There is a recent historical example to this question.
This was precisely the dilemna that the Zapotec Indian, lawyer and revolutionary Benito Juarez was confronted with during the Mexican War of the Reform (1855—1867) against Emperor Maximilian I of Mexico.
Jaurez was surrounded by Maximilian’s troops—holed up in the northern provinces while in-fighting with his political cohorts, some of whom he knew were willing to assassinate him in order to co-opt and corrupt his ideal of a free democratic Mexico to their own despotic benefit. It was at this time that Maximillian offered him peace, amnesty for his troops and the position of Prime Minister in a proposed democratic empire under Max.
First he refused Max’s offer because a democracy under a dictator will always be ultimately protective of the powers of the Emperor (and therefore a sham) and, secondly he was able to neutralize his internal enemies and avoid a corrupt Republic. He chose neither because one was a despotic monarchy dressed in sham democracy, the other was a despotic Republic also dressed in sham democracy.
He eventually became the first president of the Mexican Republic and he instituted liberal, federalist, anti-clerical, and pro-capitalist reforms against conservative, centralist, corporatist, and theocratic elements that sought to reconstitute a version of the old colonial system (please note the distinction between pro-capitalist and corporatist).
Eventually, in response to the political opposition as listed above (which became violently revolutionary), President Juarez himself became somewhat despotic and undemocratic (he instituted a kind of Patriot Act and “election reforms”) which led to defections from his party. He died of a heart attack at the Presidential desk in 1872 after a questionable presidential re-election. (His administration was succeeded by his opponents, the centralized corporatists under Porfiro Diaz who lasted until the Mexican Revolution of 1910–1920.)
A corrupt democracy is no democracy at all. A dictatorship may be more efficient, but does not necessarily function in the interest of the people —when some benefit to the people occurs, it is by accident as the seat of power, the despotic government, must always be fed first. In my opinion, neither of these forms of government are acceptable and, it they cannot be remedied via the halls of government, they must be taken down in other ways.