This is Part 2A of a (rather irregular) series on what the state is obligated to do under God’s authority.
[I base the following on exhaustive searches in the Bible (ESV) of “govern”, “rule (v.)” and “ruler”.]
Being Just in Ruling and Judging
Encoding and executing justice while shunning injustice is the first function of the state, its duty before God.
Wisdom: Discernment Between Good and Evil
Wisdom, the thing to which which we ought to attach the most value in a ruler, is employed in service of its purpose. For the state, or rather for its leaders, the purpose of wisdom is to be able to judge between good and evil for the sake of, in the words of the U.S. Constitution, “establish[ing] justice”.
When the Lord appeared to the great king Solomon in a dream at the beginning of his reign, saying, “Ask what I shall give you,” the king asked thus:
And your servant is in the midst of your people whom you have chosen, a great people, too many to be numbered or counted for multitude. Give your servant therefore an understanding mind to govern your people, that I may discern between good and evil, for who is able to govern this your great people? (1 Ki. 3.8–9; cf. 2 Ch. 1.8–10)
God’s response to this makes it doubly clear what the nature was of the discernment Solomon asked for, discernment of what is right in the Lord’s sight, which is what God calls wisdom:
And God said to him, “Because you have asked this, and have not asked for yourself long life or riches or the life of your enemies, but have asked for yourself understanding to discern what is right, behold, I now do according to your word. Behold, I give you a wise and discerning mind, so that none like you has been before you and none like you shall arise after you. (1 Ki. 3.11–12; cf. 2 Ch. 1.11–12)
And again, what does wisdom, personified as a lady, say of herself respecting governing?
I have counsel and sound wisdom;
I have insight; I have strength.
By me kings reign,
and rulers decree what is just;
by me princes rule,
and nobles, all who govern justly.  (Pro. 8.14–16)
Wisdom for ruling, then, is about justice, about righteousness, about the goodness of God’s character.
Civil Justice: Responsibility of the Ruler
Justice is one of the primary functions of the state (2 Sa. 23.2–7), and Psalm 2 suggests that all rulers, whether of Israel or not, are to serve the Lord (vv. 10–12). Conversely, the Bible condemns those who rule unjustly for the injustice they perpetrate in their abuse of the civil law:
Can wicked rulers be allied with you,
those who frame injustice by statute?
They band together against the life of the righteous
and condemn the innocent to death. 
But the Lord has become my stronghold,
and my God the rock of my refuge.
He will bring back on them their iniquity
and wipe them out for their wickedness;
the Lord our God will wipe them out. (Ps. 94.20–23)
Proverbs 28.15–16 also likens a wicked ruler to “a roaring lion of a charging bear”; it also calls a ruler who lacks understanding a “cruel oppressor”, contrasting such a wicked ruler—wicked because he lacks wisdom and understanding of good and evil—with one who hates unjust gain.
But even more than the passages cited above, Micah 3 is one of the strongest indictments in the Bible of rulers’ injustice and rebellion against God. It hold the leaders responsible for the rampant bribery, extortion and false prophecy.
But how in the world can all this be attributed to mere failure to ? After all, are we not all sinners?
Teaching the People to be Just
The truth is that protection of “negative liberties” is not the only thing to which God calls governments through the Bible. One biblical role for those who rule is teaching the people wisdom to discern what is right:
The king sent and released him;
the ruler of the peoples set him free;
he made him lord of his house
and ruler of all his possessions,
to bind  his princes at his pleasure
and to teach his elders wisdom. (Ps. 105.20–22)
The use of “shepherds” as a metaphor for rulers also indicates this as an important role:
The word of the Lord came to me: “Son of man, prophesy against the shepherds of Israel; prophesy, and say to them, even to the shepherds, Thus says the Lord God: Ah, shepherds of Israel who have been feeding yourselves! Should not shepherds feed the sheep? You eat the fat, you clothe yourselves with the wool, you slaughter the fat ones, but you do not feed the sheep. The weak you have not strengthened, the sick you have not healed, the injured you have not bound up, the strayed you have not brought back, the lost you have not sought, and with force and harshness you have ruled them.” (Ezk. 34.1–4)
Not only do rulers have the responsibility not to lead the people astray, but they are then commanded here to go beyond that and bring back those who have strayed and seek out the lost. Furthermore, these verses from Ezekiel imply that not only is a ruler not to exploit the people but that he is also to strengthen the weak, heal the sick, bind up the injured.
So the almost explicit call for the state to be an instrument of justice is not limited to the laws and the enforcement thereof but extends to fostering the individual justice and righteousness of the population as a whole by teaching the people to do what is pleasing in the Lord’s sight.
I shall post later on what the New Testament has to say about the role of the state, but feel free to contribute your comments and thoughts about what the state does and does not have the right and duty to do.