This is from Wuest's Word Studies:
The word "minister" is diakonos, "a servant as seen in his activity." The civil magistrate, saved or unsaved, is a servant of God in the sense that since God has instituted human government as a means of regulating the affairs of the human race, a magistrate who carries out the law, acts as a servant of God. As to the sword which the magistrate wears, Vincent says; "Borne as a symbol of the magistrate's right to inflict capital punishment. Thus Ulpian, 'They who rule a whole province, have the right to the sword.' The Emperor Trajan presented to a provincial governor, on starting for his province, a dagger, with the words, 'For me. If I deserve it, in me.' " Alford comments; "In ancient times and modern times, the sword has been carried before sovereigns. It betokens the power of capital punishment: and the reference to it here is among the many testimonies borne by Scripture against the attempt to abolish the infliction of the penalty of death for crime in Christian states."