In 1839, the first railway in Italy opened between Naples and the town of Portici. Two locomotives were imported from England to inaugurate the new route, while other materials arrived from a small factory near Naples that produced steam engines and ammunition for military use.
The Officine di Pietrarsa opened in 1840, initially as a steel mill and as a repair station for the locomotives imported from England. It later became the first Italian factory to produce locomotives in 1845. The factory quickly became the largest industrial center not only in the Kingdom of the Two Sicilies, but in all of Italy with more than 1,100 workers. It was visited by Pope Pius IX and Tsar Nicholas I of Russia and also produced a statue of King Ferdinand II of the Two Sicilies, one of the largest ever made in Italy.
The unification of Italy marked the end of the golden age of the Officine di Pietrarsa, with most of the production relocated to the north. Job reductions and strikes lead to a revolt in 1863, with the subsequent bloody repression resulting in seven deaths.
The factory continued to make locomotives, railways, and other steelworks, however, production decreased until the Officine di Pietrarsa was finally closed in 1975. The place was initially abandoned but was later turned into a museum that still stands today in 1989.