Defining Dina Demalchusa

An excerpt:

The Rishonim in Nedarim (28) distinguish between dina d’malchusa, fair laws that are necessary for good governance, and dina d’malka, arbitrary laws decreed by whim of the ruler. Halacha demands that we respect the former, but shows no recognition of the latter. A theoretical question: when the President withholds necessary anti-terror funds from a city, endangering the entire population, as an act of retribution against a Senator from his own party who dared cross him, are we dealing with dina d’malka or dina d’malchusa?  Or when the Attorney General threatens to prosecute those who engage in “anti-Muslim speech” but  makes no move to bring charges against a Secretary of State who kept top secret data on an unsecure mail server in a bathroom, are the laws of the land being enforced dina d’malka or dina d’malchusa? I can give plenty more examples, but you get the idea.  Just wondering at what point we’ve crossed the line.

I prefer his second example.

From Divrei Chaim, here.