The castle of Tossa was built in 1187 by Abbot Ramón Dezcatlar of the Monastery of Ripoll to protect the locals from pirate attacks in exchange for a special tax. The local fishermen were also required to pay tithes to the Abbot, a tax against which they rebelled in 1420, claiming that the Abbot was not operating his protection business efficiently.
During the War of Independence against Napoleon, the castle witnessed some combat between French and Spanish troops.