There has been a lot of talk about firearms on merchant vessels to protect against piracy. Even if we take out the liability ramifications, and the legal issues as far as flag state is concerned,there are still a lot of problems associated with firearms.
If the vessel owns the firearms, the run the risk of delay in ports due to inspections of the firearms and ammunition. If the security company is to provide weapons, they will have a problem providing the firearms in almost any port. Egypt, Saudi Arabia, Yemen, Oman and the UAE expressly forbid the possession of firearms by non citizens, and further, by anyone that is not a policeman or active duty military.
Therefore there is only a couple ways to provide the security service with firearms. Either you have your own vessel and an end user certificate for the firearms, or you make arrangements for the firearms (illegally) to be provided by a third party, usually at sea.
Should you have your own vessel, multiply that by two and you are now cost prohibitive to provide the armed service. I say multiply by two because you will need a vessel on each end of the transit. Otherwise, you must escort the ship with your vessel and again, cost prohibitive. Should you make the arrangement for weapons illegally, then the shipping company can become party to the illegal activity. Obtaining the weapons illegally is also a very high cost, because they must be disposed of prior to the end of the voyage. This is usually done by throwing the weapons over board.
The answer is, develop a methodology that includes a proper security posture for the vessel and have the proper team. If your methods are correct, your security posture correct, and your response effective, you will not need firearms on the vessel.