There was an international agreement in the 1870s (IIRC) that forbade arming of merchant ships. The US of A pushed for it as we had suffered serious losses at the hands of CSA raiders in the War Between the States -- raiders that were (guess what) often armed merchantmen.
In those days a.) piracy was at a very low level and b.) there were plenty of gunboats available from the "evil imperialists" of the day to terminate any practitioners of the art -- with extreme prejudice.
I can't recall how Churchill as First Lord of the Admiralty justified arming Britishmerchantmen in War One but he basically told the international community that they could take their "law" and shove it up his cigar and light it.
We followed Churchill's model in War's One and Two.
Dare I say it? Perhaps there aren't enough Churchills out there to deal with the current situation.
A version of the WW II Naval Armed Guard would, IMHO, work wonders on making a few pirates components of the marine food chain; other possible pirates would get the idea.