Hoshea 8:4 {as translated by
https://www.sefaria.org.il/Hosea.8.4?lang=bi&with=all&lang2=en)
They have made kings,
But not with My sanction;
They have made officers,
But not of My choice.
Of their silver and gold
They have made themselves images,
To their own undoing.
Here begins Rabbi Meir Kahane's commentary in Hebrew, which is currently located at: https://www.rabbikahane.org/books/%D7%A4%D7%99%D7%A8%D7%95%D7%A9%20%D7%94%D7%9E%D7%9B%D7%91%D7%99/%D7%94%D7%95%D7%A9%D7%A2%20-%D7%A7%D7%98%D7%A2%D7%99%20%D7%A4%D7%99%D7%A8%D7%95%D7%A9%D7%99%D7%9D/They have made kings but not by My sanction. Ibn Ezra explains:
"For they did not ask Hashem for permission to make Yeravam King, and it is written (Deuteronomy 17:15): "that Hashem your L-rd chooses him', this also being the case for a King of Israel".
Now Radak wrote: "When they saw that he prevented them from ascending to Jerusalem before Hashem and he made for them calves {comment by the translator: as intermediaries or gods}, they should have removed him from being king….". Behold, the nation has the right and the obligation to take down the government that prevents it from going in the way of Hashem (see Sanhedrin 26a.; in the matter of Chizkiyahu and Shevna - that any majority that is against Hashem is considered just a conspiracy of the wicked). Now it appears, that if it doesn't prevent the nation from going in the ways of Hashem, even if the government doesn't observe commandments, perhaps there is not an obligation to bring it down by force, if this would lead to a civil war; however, if the government does not let, even some individuals in the nation to perform commandments, definitely, they are obligated even to use force to fulfill the mitzvah.
Comment on Rabbi Kahane's commentary: If Rabbi Kahane is right one must ask, why didn't the prophet Hoshea, himself, launch an attack against the king that ruled in his time. I am adding this comment in order to get the hotheads to cool off, even though I suspect, Rabbi Kahane whose life was cut short by a Muslim assassin had an answer but did not put it into writing.