Romans 13:4

4 for of God it is a ministrant to thee for good; and if that which is evil thou mayest do, be fearing, for not in vain doth it bear the sword; for of God it is a ministrant, an avenger for wrath to him who is doing that which is evil.

Romans 13:4 Meaning and Commentary

Romans 13:4

For he is the minister of God to thee for good
He is a minister of God's appointing and commissioning, that acts under him, and for him, is a kind of a vicegerent of his, and in some, sense represents him; and which is another reason why men ought to be subject to him; and especially since he is appointed for their "good", natural, moral, civil, and spiritual, as Pareus observes: for natural good, for the protection of men's natural lives, which otherwise would be in continual danger from wicked men; for moral good, for the restraining of vice, and encouragement of virtue; profaneness abounds exceedingly, as the case is, but what would it do if there were no laws to forbid it, or civil magistrates to put them in execution? for civil good, for the preservation of men's properties, estates, rights, and liberties, which would be continually invaded, and made a prey of by others; and for spiritual and religious good, as many princes and magistrates have been; a sensible experience of which we have under the present government of these kingdoms, allowing us a liberty to worship God according to our consciences, none making us afraid, and is a reason why we should yield a cheerful subjection to it:

but if thou do that which is evil, be afraid:
of the punishment of such evil threatened by law, and to be inflicted by the civil magistrate;

for he beareth not the sword in vain.
The "sword" is an emblem of the power of life and death, the civil magistrate is invested with, and includes all sorts of punishment he has a right to inflict; and this power is not lodged in him in vain; he may and ought to make use of it at proper times, and upon proper persons:

for he is the minister of God;
as is said before, he has his mission, commission, power and authority from him; and is

a revenge to execute wrath upon him that doeth evil;
he is a defender of the laws, a vindicator of divine justice, an avenger of the wrongs of men; and his business is to inflict proper punishment, which is meant by wrath, upon delinquents.

Romans 13:4 In-Context

2 so that he who is setting himself against the authority, against God's ordinance hath resisted; and those resisting, to themselves shall receive judgment.
3 For those ruling are not a terror to the good works, but to the evil; and dost thou wish not to be afraid of the authority? that which is good be doing, and thou shalt have praise from it,
4 for of God it is a ministrant to thee for good; and if that which is evil thou mayest do, be fearing, for not in vain doth it bear the sword; for of God it is a ministrant, an avenger for wrath to him who is doing that which is evil.
5 Wherefore it is necessary to be subject, not only because of the wrath, but also because of the conscience,
6 for because of this also pay ye tribute; for servants of God they are, on this very thing attending continually;
Young's Literal Translation is in the public domain.