Peyrepertuse was associated with the Counts of Barcelona, later kings of Aragon before the area was annexed by France.
The name Peyrepetuse is derived from Pèirapertusa, Occitan, meaning Pierced Rock.
The lower part of the castle was built on a strategic location by the kings of Aragon in the 11th Century and the higher part by the French King Louis IX later on, after the area was annexed to France. The two castles are linked together by a staircase. The castle lost importance as a strategic castle when the border between France and Spain was moved in 1659, causing the castle to be abandoned.