In the earliest day of naval warfare, there was little distinction between sailors and soldiers on a warship. The oarsmen of Ancient Greek and Roman ships had to be capable of fighting the rowers of opposing ships hand-to-hand; though hoplites began appearing on Greek ships specifically for the boarding of enemy ships.
The Roman Republic was the first to understand the importance of professional soldiers dedicated to melee combat onboard of ships. During the First Punic War, Roman crews remained inferior in naval experience to the Carthaginians and could not hope to match them in naval tactics, which required great fleet maneuverability and tactical experience. The Romans therefore employed a novel weapon which changed sea warfare to their advantage — they equipped their ships with the corvus, a long pivoting plank with a beak-like spike on the underside for hooking onto enemy ships, possibly developed earlier by the Syracusans against the Athenians during the Sicilian Expedition of the Peloponnesian War. Using it as a boarding bridge, Roman infantrymen were able to invade an enemy ship, transforming sea combat into a version of land combat, where the Roman legionaries had the upper hand. During the early Principate, a ship's crew, regardless of its size, was organized as a centuria. Crewmen could sign on as naval infantry (called Marinus), rowers/seamen, craftsmen and various other jobs, though all personnel serving in the imperial fleet were classed as milites ("soldiers"), regardless of their function; only when differentiation with the army was required, were the adjectives classiarius or classicus added. The Roman Navy's two fleet legions, I Adiutrix and II Adiutrix, were among the first distinct naval infantry units.
The first organized marine corps was created in Venice by the Doge Enrico Dandolo when he created the first regiment of ten companies spread on several ships. That Corps participated to the conquest of Byzantium (1203-1204), later officially called " Fanti da Mar" (sea infantry) in 1550.
Later also the Spanish king, Carlos I, assigned the naval infantry of the Compañías Viejas del Mar de Nápoles (Naples Sea Old Companies) to the Escuadras de Galeras del Mediterráneo (Mediterranean Galley Squadrons) in 1537, progenitors of the current Spanish Navy Marines (Infantería de Marina) corps, making them the oldest marine corps still in active service in the world.
The third oldest marine corps in the world was founded as the Terço of the Navy of the Crown of Portugal in 1618, predecessor to the modern Portuguese Marine Corps.