A port is a maritime facility comprising one or more wharves or loading areas, where ships load and discharge cargo and passengers. Although usually situated on a sea coast or estuary, ports can also be found far inland, such as Hamburg, Manchester and Duluth; these access the sea via rivers or canals. Because of their roles as ports of entry for immigrants as well as soldiers in wartime, many port cities have experienced dramatic multi-ethnic and multicultural changes throughout their histories.
Ports are extremely important to the global economy; 70% of global merchandise trade by value passes through a port. For this reason, ports are also often densely populated settlements that provide the labor for processing and handling goods and related services for the ports. Today by far the greatest growth in port development is in Asia, the continent with some of the world's largest and busiest ports, such as Singapore and the Chinese ports of Shanghai and Ningbo-Zhoushan. As of 2020, the busiest passenger port in Europe is the Port of Helsinki in Finland. Nevertheless, countless smaller ports do exist that may only serve their local tourism or fishing industries.
Ports can have a wide environmental impact on local ecologies and waterways, most importantly water quality, which can be caused by dredging, spills and other pollution. Ports are heavily affected by changing environmental factors caused by climate change as most port infrastructure is extremely vulnerable to sea level rise and coastal flooding. Internationally, global ports are beginning to identify ways to improve coastal management practices and integrate climate change adaptation practices into their construction.
Main article: Historical ports
Wherever ancient civilisations engaged in maritime trade, they tended to develop sea ports. One of the world's oldest known artificial harbors is at Wadi al-Jarf on the Red Sea. Along with the finding of harbor structures, ancient anchors have also been found.
Other ancient ports include Guangzhou during Qin Dynasty China and Canopus, the principal Egyptian port for Greek trade before the foundation of Alexandria. In ancient Greece, Athens' port of Piraeus was the base for the Athenian fleet which played a crucial role in the Battle of Salamis against the Persians in 480 BCE. In ancient India from 3700 BCE, Lothal was a prominent city of the Indus valley civilisation, located in the Bhal region of the modern state of Gujarāt. Ostia Antica was the port of ancient Rome with Portus established by Claudius and enlarged by Trajan to supplement the nearby port of Ostia. In Japan, during the Edo period, the island of Dejima was the only port open for trade with Europe and received only a single Dutch ship per year, whereas Osaka was the largest domestic port and the main trade hub for rice.
Post-classical Swahili kingdoms are known to have had trade port islands and trade routes with the Islamic world and Asia. They were described by Greek historians as "metropolises". Famous African trade ports such as Mombasa, Zanzibar, Mogadishu and Kilwa were known to Chinese sailors such as Zheng He and medieval Islamic historians such as the Berber Islamic voyager Abu Abdullah ibn Battuta.
Many of these ancient sites no longer exist or function as modern ports. Even in more recent times, ports sometimes fall out of use. Rye, East Sussex, was an important English port in the Middle Ages, but the coastline changed and it is now 2 miles (3.2 km) from the sea, while the ports of Ravenspurn and Dunwich have been lost to coastal erosion.
Whereas early ports tended to be just simple harbours, modern ports tend to be multimodal distribution hubs, with transport links using sea, river, canal, road, rail and air routes. Successful ports are located to optimize access to an active hinterland, such as the London Gateway. Ideally, a port will grant easy navigation to ships, and will give shelter from wind and waves. Ports are often on estuaries, where the water may be shallow and may need regular dredging. Deep water ports such as Milford Haven are less common, but can handle larger ships with a greater draft, such as super tankers, Post-Panamax vessels and large container ships. Other businesses such as regional distribution centres, warehouses and freight-forwarders, canneries and other processing facilities find it advantageous to be located within a port or nearby. Modern ports will have specialised cargo-handling equipment, such as gantry cranes, reach stackers and forklift trucks.
Ports usually have specialised functions: some tend to cater mainly for passenger ferries and cruise ships; some specialise in container traffic or general cargo; and some ports play an important military role for their nation's navy. Some third world countries and small islands such as Ascension and St Helena still have limited port facilities, so that ships must anchor off while their cargo and passengers are taken ashore by barge or launch (respectively).
In modern times, ports survive or decline, depending on current economic trends. In the UK, both the ports of Liverpool and Southampton were once significant in the transatlantic passenger liner business. Once airliner traffic decimated that trade, both ports diversified to container cargo and cruise ships. Up until the 1950s the Port of London was a major international port on the River Thames, but changes in shipping and the use of containers and larger ships have led to its decline. Thamesport, a small semi-automated container port (with links to the Port of Felixstowe, the UK's largest container port) thrived for some years, but has been hit hard by competition from the emergent London Gateway port and logistics hub.
In mainland Europe, it is normal for ports to be publicly owned, so that, for instance, the ports of Rotterdam and Amsterdam are owned partly by the state and partly by the cities themselves.
Even though modern ships tend to have bow-thrusters and stern-thrusters, many port authorities still require vessels to use pilots and tugboats for manoeuvering large ships in tight quarters. For instance, ships approaching the Belgian port of Antwerp, an inland port on the River Scheldt, are obliged to use Dutch pilots when navigating on that part of the estuary that belongs to the Netherlands.
Ports with international traffic have customs facilities.
The terms "port" and "seaport" are used for different types of facilities handling ocean-going vessels, and river port is used for river traffic, such as barges and other shallow-draft vessels.
Main article: Inland port
An inland port is a port on a navigable lake, river (fluvial port), or canal with access to a sea or ocean, which therefore allows a ship to sail from the ocean inland to the port to load or unload its cargo. An example of this is the St. Lawrence Seaway which allows ships to travel from the Atlantic Ocean several thousand kilometers inland to Great Lakes ports like Toronto, Duluth-Superior, and Chicago. The term "inland port" is also used for dry ports.
A seaport is a port located on the shore of a sea or ocean. It is further categorized as commercial and non-commercial: 
Cargo ports are quite different from cruise ports, because each handles very different cargo, which has to be loaded and unloaded by a variety of mechanical means.
Bulk cargo ports may handle one particular type of cargo or numerous cargoes, such as grains, liquid fuels, liquid chemicals, wood, automobiles, etc. Such ports are known as the "bulk" or "break bulk ports".
Ports that handle containerized cargo are known as container ports.
Most cargo ports handle all sorts of cargo, but some ports are very specific as to what cargo they handle. Additionally, individual cargo ports may be divided into different operating terminals which handle the different types of cargoes, and may be operated by different companies, also known as terminal operators, or stevedores.
A cruise home port is the port where cruise ship passengers board (or embark) to start their cruise and disembark the cruise ship at the end of their cruise. It is also where the cruise ship's supplies are loaded for the cruise, which includes everything from fresh water and fuel to fruits, vegetables, champagne, and any other supplies needed for the cruise. "Cruise home ports" are very busy places during the day the cruise ship is in port, because off-going passengers debark their baggage and on-coming passengers board the ship in addition to all the supplies being loaded. Cruise home ports tend to have large passenger terminals to handle the large number of passengers passing through the port. The busiest cruise home port in the world is the Port of Miami, Florida.
A port of call is an intermediate stop for a ship on its sailing itinerary. At these ports, cargo ships may take on supplies or fuel, as well as unloading and loading cargo while cruise liners have passengers get on or off ship.
A fishing port is a port or harbor for landing and distributing fish. It may be a recreational facility, but it is usually commercial. A fishing port is the only port that depends on an ocean product, and depletion of fish may cause a fishing port to be uneconomical.
A marina is a port for recreational boating.
A warm-water port (also known as an ice-free port) is one where the water does not freeze in winter. This is mainly used in the context of countries with mostly cold winters where parts of the coastline freezes over every winter. Because they are available year-round, warm-water ports can be of great geopolitical or economic interest. Such settlements as Narvik in Norway, Dalian in China, Murmansk, Novorossiysk, Petropavlovsk-Kamchatsky and Vostochny Port in Russia, Odesa in Ukraine, Kushiro in Japan and Valdez at the terminus of the Alaska Pipeline owe their very existence to being ice-free ports. The Baltic Sea and similar areas have ports available year-round beginning in the 20th century thanks to icebreakers, but earlier access problems prompted Russia to expand its territory to the Black Sea.
Main article: Dry port
A dry port is an inland intermodal terminal directly connected by road or rail to a seaport and operating as a centre for the transshipment of sea cargo to inland destinations.
Main article: Smart port
A smart port uses technologies, including the Internet of Things (IoT) and artificial intelligence (AI) to be more efficient at handling goods. Smart ports usually deploy cloud-based software as part of the process of greater automation to help generate the operating flow that helps the port work smoothly. At present, most of the world's ports have somewhat embedded technology, if not for full leadership. However, thanks to global government initiatives and exponential growth in maritime trade, the amount of intelligent ports has gradually increased. This latest report by business intelligence provider Visiongain assesses that Smart Ports Market spending will reach $1.5 bn in 2019.
Further information: Environmental impact of shipping
Ports and their operation are often a cause of environmental issues, such as sediment contamination and spills from ships and are susceptible to larger environmental issues, such as human caused climate change and its effects.
Main article: Dredging
Every year 100 million cubic metres of marine sediment are dredged to improve waterways around ports. Dredging, in its practice, disturbs local ecosystems, brings sediments into the water column, and can stir up pollutants captured in the sediments.
Invasive species are often spread by the bilge water and species attached to the hulls of ships. It is estimated that there are over 7000 invasive species transported in bilge water around the world on a daily basis Invasive species can have direct or in-direct interactions with native sea life. Direct interaction such as predation, is when a native species with no natural predator is all of a sudden prey of an invasive specie. In-direct interaction can be diseases or other health conditions brought by invasive species. 
Ports are also a source of increased air pollution as a result of ships and land transportation at the port. Transportation corridors around ports have higher exhaust emissions and this can have related health effects on local communities.
Water quality around ports is often lower because of both direct and indirect pollution from the shipping, and other challenges caused by the port's community, such as trash washing into the ocean.
Sewage from ships, and leaks of oil and chemicals from shipping vessels can contaminate local water, and cause other effects like nutrient pollution in the water.
Ports and their infrastructure are very vulnerable to climate change and sea level rise, because many of them are in low-lying areas designed for status quo water levels. Variable weather, coastal erosion, and sea level rise all put pressure on existing infrastructure, resulting in subsidence, coastal flooding and other direct pressures on the port.
There are several initiatives to decrease negative environmental impacts of ports. The World Port Sustainability Program points to all of the Sustainable Development Goals as potential ways of addressing port sustainability. These include SIMPYC, the World Ports Climate Initiative, the African Green Port Initiative, EcoPorts and Green Marine.
Main article: Lists of ports
The port of Shanghai is the largest port in the world in both cargo tonnage and activity. It regained its position as the world's busiest port by cargo tonnage and the world's busiest container port in 2009 and 2010, respectively. It is followed by the ports of Singapore, Hong Kong and Kaohsiung, Taiwan, all of which are in East and Southeast Asia.
The port of Singapore is the world's second-busiest port in terms of total shipping tonnage, it also transships a third of the world's shipping containers, half of the world's annual supply of crude oil, and is the world's busiest transshipment port.
See also: List of busiest ports in Europe
Europe's busiest container port and biggest port by cargo tonnage by far is the Port of Rotterdam, in the Netherlands. It is followed by the Belgian Port of Antwerp or the German Port of Hamburg, depending on which metric is used. In turn, the Spanish Port of Valencia is the busiest port in the Mediterranean basin, while the Portuguese Port of Sines is the busiest atlantic port.
The largest ports include the South Louisiana, Houston, Port of New York/New Jersey, Los Angeles in the U.S., Manzanillo in Mexico and Vancouver in Canada. Panama also has the Panama Canal that connects the Pacific and Atlantic Ocean, and is a key conduit for international trade.
The largest port in Australia is the Port of Melbourne.
According to ECLAC's "Maritime and Logistics Profile of Latin America and the Caribbean", the largest ports in South America are the Port of Santos in Brazil, Cartagena in Colombia, Callao in Peru, Guayaquil in Ecuador, and the Port of Buenos Aires in Argentina.
Vostochny Port is located in the south of Primorsky Region, in the southeast of Nakhodka bay, in Vrangel bay. This is unique natural harbor is no ice restrictions even in severe winters.