Is Islam and democracy compatible?
If your question is whether Muslims can decide and run the affairs of their country through consultation and consensus among the people the answer is yes; but if, while exercising this authority, they were to legislate on matters on which God and His Messenger have pronounced decisive judgments, then that is not acceptable in Islam. A case in point is legislation to legalize homosexuality, fornication, adultery, aggressive wars, discrimination based on race or ethnicity or language, liquor and intoxicants, etc. People have no authority to legislate on matters God has pronounced a decisive judgment. Nor are they allowed to tamper with them.
People, however, are mandated to make decisions on all matters that do not fall under the purview of the divine writ through mutual consultation and consensus among themselves. This area of legislation in Islam is at once immense and extensive whereas the first category where they have no freedom to exercise legislative authority is rather limited.
The vast area of legislation affecting public life and social relations are, therefore, subject to democratic practice so long as they are governed by the Qur'anic imperatives to establish Truth, Justice, Fairness and Compassion as best as humanly possible. People are not only permitted to achieve this through democratic process of consultation and consensus; rather they are mandated to do so according to the clear orders of God in the Quran:
"----And consult them in their affairs; then when you decide (matters based on consultation) put your trust in Allah (in implementing the same) for verily Allah loves those who place their trust in Him." (Qur'an: 3: 159)."
"And their affairs are run through mutual consultation!" (Qur'an: 42: 38).
The Prophet, peace be upon him, further warned rulers/leaders who betray the trust invested in them by people of terrible divine retribution.
Finally, the Quranic mandate for humanity is to establish Justice, Compassion and to strive against injustice, evil and aggression:
"Verily, God commands justice and compassion, and giving freely to the kith and kin, and He forbids lewdness, evil of all kinds and aggression; He admonishes you in order for you to remain conscientious." (Qur'an: 16: 90).
"O you who believe, be steadfast witnesses for Allah in equity; and let not hatred of any people make you swerve from justice. Deal justly; that is nearer to God-fearing. Fear Allah. Allah is aware of what you do." (Qur'an: 5: 8).
To conclude: If anyone thinks Islam sanctions monarchy, dictatorship and despotic rule, and is opposed to democracy as stated above, they are simply contradicting the teachings of the Qur'an both in letter and spirit.