Until World War II nations were able to maintain their dominance, or in some cases, even improve their position in maritime trade by offering vessels exclusive protection for flying their flags, which would in turn give the nation exclusive control over the vessels. Shipowners during this time needed protection from pirates and privateers which was provided by naval vessels of the flag state. In some cases states offered subsidies to the shipbuilding industries.