A 323-year-old ship's pass signed by King James II and Samuel Pepys has been presented to the National Library of Ireland by the Dublin Port Company.

The pass is dated from 1687.

It is one of the few known examples of 17th century ships' passes in the world.

There are others held at the National Archives in Kew in London and at the National Maritime Museum in Greenwich.

The pass was designed to provide passage for the merchant vessel the Mary of Cork.

Mary of Cork left Dublin Port in late 1687 bound for the Canary Islands.

It is believed the Mary of Cork may have been trading in sugar and fortified wine in return for products such as salted Irish beef.

The ship's pass was acquired by the Dublin Port & Docks Board in 1924 and will soon be on display in the National Library's Department of Manuscripts.