From the 6th century, the constant threat of Arab pirates pushed the people living along the coast to move further inland to safer places like the parish of Sant Feliu d’Alella and Sant Martí de Teià.
The farmhouse, or Mas, which the town of El Masnou is named for, was first documented in 1055 as manso novelli, on land belonging to Teià and Alella (its location is unknown today).
The inhabitants of these villages were farmers, while a few fishermen’s shacks were built on the beach. Fortified farmhouses were built over the years, such as Can Teixidor and Can Fontanills. Even so, the persistent pirate raids forced the population to build watchtowers, so many that the Maresme became known as the ’Coast of Towers’, the costa Torrejada.
Some large farmhouses were built close to the beach, but a town slowly emerged close to the sea between the 17th and 18th centuries, and achieved municipal independence from Teià in 1825. Two royal commands in 1840 and 1846 led to the growth of El Masnou when it annexed the neighbouring hamlet of Alella de Mar.