In ancient Roman religion, Portunes (alternatively spelled Portumnes or Portunus) was a god of keys, doors and livestock. He protected the warehouses where grain was stored. Probably because of folk associations between porta "gate, door" and portus "harbor", the "gateway" to the sea, Portunus later became conflated with Palaemon and evolved into a god primarily of ports and harbors. In the Latin adjective importunus his name was applied to untimely waves and weather and contrary winds, and the Latin echoes in English opportune and its old-fashioned antonym importune, meaning "well timed' and "badly timed". Hence Portunus is behind both an opportunity and importunate or badly timed solicitations (OED).
His festival, celebrated on August 17, the seventeenth day before the Kalends of September, was the Portumnalia, a minor occasion in the Roman year. On this day, keys were thrown into a fire for good luck in a very solemn and lugubrious manner. His attribute was a key and his main temple in the city of Rome, the Temple of Portunus, was to be found in the Forum Boarium.
Portunus appears to be closely related to the god Janus, with whom he shares many characters, functions and the symbol of the key. He too was represented as a two headed being, with each head facing opposite directions, on coins and as figurehead of ships. He was considered to be "deus portuum portarumque praeses" (lit. God presiding over ports and gates.)
The relationship between the two gods is underlined by the fact that the date chosen for the dedication of the rebuilt temple of Janus in the Forum Holitorium by emperor Tiberius is the day of the Portunalia, August 17.
Linguist Giuliano Bonfante has speculated, on the grounds of his cult and of the meaning of his name, that he should be a very archaic deity and might date back to an era when Latins lived in dwellings built on pilings. He argues that in Latin the words porta (door, gate) and portus (harbour, port) share their etymology from the same IE root meaning ford, wading point.