The Consulate of the Sea was a quasi-judicial body set up in the Crown of Aragon, later to spread throughout the Mediterranean basin, to administer maritime and commercial law. The term may also refer to a celebrated collection of maritime customs and ordinances in Valencian, also known in English as The Customs of the Sea, compiled over the 14th and 15th centuries and published at Barcelona in or before 1494.
In the 21st century, the Valencian term Consolat de mar is used for a commercial arbitration service operated by the Barcelona Chamber of Commerce, and also for a series of trade-promotion offices operated by the city of Barcelona.
The Catalan institution can be traced to the grant of the Carta Consular to the city of Barcelona by James I of Aragon in 1258. This gave Barcelona merchants the right to settle their commercial disputes without interference from the royal courts: in return, the king received much needed financial support for his wars of expansion. Mercantile Law (ius mercadorium) was becoming established at the same time through much of Europe, and similar bodies had already been established in Messina (first third of the 13th century) and Genoa (1250).
As the territories of the Crown of Aragon expanded, it was customary to establish new Consulates of the Sea in the major ports. One of the earliest was in Valencia (1283), where the charter of Peter III of Aragon makes it clear that disputes are to be settled "according to maritime customs, as these are accepted in Barcelona."
The full title in Catalan is Les costums marítimes de Barcelona universalment conegudes per Llibre del Consolat de mar, or "The maritime customs of Barcelona universally known as the Book of the Consulate of the Sea". The earliest extant printed edition of the work (Barcelona, 1494) is without a title-page or frontispiece, but it is described by the above-mentioned title in the epistle dedicatory prefixed to the table of contents. The only known copy of this edition (as of 1911) is preserved in the Bibliothèque nationale de France in Paris. The epistle dedicatory states that the work is an amended version of the Book of the Consulate of the Sea, compiled by Francis Celelles with the assistance of numerous shipmasters and merchants well versed in maritime affairs.