Venezuela has been doing this for years. I don't know about commercial boats, but most US flagged private vessels avoid Venezuelan waters because it isn't safe unless you're armed and if you are armed, it'll go one of three ways. 1) You're able to bribe the officials and secure your weapons aboard the vessel (rare), or 2) They'll just take your weapons and pirates will conveniently find you that night and hold you at gunpoint while making off with anything of value (which the customs officials happened to make note of), or 3) You'll be "detained" if you don't have sufficient booze/bribes to make nice.
Vessels that wanted to see Venezuela, even with the risks, either handed their weapons off to another vessel and rendezvoused elsewhere to collect them back, or hide them in a well-concealed location aboard, or came prepared to offer suitable bribes.
And then there are the vessels that don't carry weapons but officials managed to find weapons aboard anyway.
If it weren't for the natural beauty and the fact that a case of decent rum was about $1.22 USD, most boaters would avoid the place like the plague.