The rules of civil law are largely regulated by the Norwegian Maritime Code, while public oversight is regulated by the Act relating to ship safety and security (The Ship Safety and Security Act). To some extent international law also comes under maritime law. This includes the right of vessels to free passage through a state's outer territorial waters or the port state's right to control the safety of calling alien ships, or the immunity of government ships from arrest in a foreign port.
The public maritime regulations relating to ship safety, pollution prevention and seafarers' working and living conditions are implemented in the Norwegian Maritime Directorate regulations. The rules consist for the most part of the implementation of international conventions. These conventions are developed in the International Maritime Organization (IMO), which is part of the UN system. The most important conventions are SOLAS (Safety of Life at Sea), MARPOL (the International Convention for the Prevention of Pollution from Ships) and STCW (Standards of Training, Certification and Watchkeeping for Seafarers).