The aim of maritime security is to detect and deter security threats and take preventative measures against security incidents affecting ships or port facilities and to protect from harm passengers, crews, ships and their cargoes, port facilities and the people who work and live in port areas.