If you do this, other militaries will simply stop buying from you.
In addition, if it is hardware based, other nations can always find ways to remove it.
It’s honestly easier, with advanced weapons, to just make them reliant on you for parts for maintenance. Things like fighter jets require very specific parts that are often built to tight tolerances – a lot of nations buying them can’t fly their planes for long if they piss off their supplier.
Latest Answers