During the 18th century, a fortress was built at Montjuïc overlooking the harbour. On 16 March 1794, even though France and Spain were at war, the French astronomer Pierre François André Méchain was given leave to enter the fortress to make observations that were to be used to measure the distance from Dunkirk to Barcelona, two cities lying on approximately the same longitude as each other and also the longitude through Paris. Using this measurement and the latitudes of the two cities they could calculate the distance between the North Pole and the Equator in classical French units of length and hence produce the first prototype metre which was defined as being one ten millionth of that distance. The definitive metre bar, manufactured from platinum, was deposited in the Archives of the French Republic by the French legislative assembly on 22 June 1799.
