Pasta has long been a part of Italian cuisine, but only quite recently acquired the dominant, pervasive role it plays now.
The oldest form is thought to be lasagna, which is known to have been cooked in ancient Rome, though not quite in the way it is today.
Dried pasta seems to have been invented quite separately, in North Africa, as expedition food for desert caravans. It was probably brought to Sicily by the island’s Muslim conquerors. In a codex published in 1154, a Moroccan geographer and botanist known as al-Idrisi described a thriving pasta manufacturing industry near Palermo, which exported its products to Muslim and Christian countries alike. Among them was a stringlike pasta then known by the name itrija.
Dried pasta had the same advantages for seafarers as it did for camel drivers, so it is hardly surprising that it next appears in Genoa.
It is mentioned in a document written in 1279, and production of vermicelli, which was to remain a Genoese specialty, had begun by the fourteenth century.
The consumption of pasta continued nevertheless to be associated with Sicilians until in the 18th century the nickname of mangiamaccheroni gradually came to be bestowed on the Neapolitans. By 1785, Naples had 280 pasta shops.
Hooper, John. The Italians (pp. 99-100). Penguin Publishing Group. Kindle Edition.