Obeying tyrants as a religious duty

if muslim ruler does not enforce shariah properly in his own land he has no right to do that. Atleast in theory