In the past, port security was concerned with deterring theft, the passage of illegal immigrants and countering smuggling and contraband. Some smaller ports had no security measures of any significance. Other, larger ports, had their own security personnel. Even they were not concerned with matters other then theft. In other countries, ports were considered military installations and therefore, security was an integral part of their management.
This changed in the light of the 9 / 11 attacks in the USA in 2001. The International Ship and Port Facility Security Code (ISPS Code) was agreed in 2002, came into force in 2004, and is a comprehensive set of measures to enhance the security of ships and port facilities based on risk management that determine what security measures are appropriate.
The International Ship and Port Facility Security Code (ISPS Code) is intended to provide improved protection from terrorist attacks for all port facilities receiving seagoing ships larger than 500 Gross Ton on international routes.