The Port of Tanger Med (also written as Port of Tangier Med) is a Moroccan cargo port located on the Strait of Gibraltar about 40 km east of Tangier, Morocco. It is the largest port on the Mediterranean and in Africa by capacity and went into service in July 2007. Its initial capacity was 3.5 million shipping containers. As of 2019, the port has been upgraded to handle over 9 million containers and ranked the 18th in the world.