The town is an example of the medieval fortified town known as a bastide. It was founded by Philip the Bold in 1281. Graffiti by Knights Templar imprisoned here following the dissolution of the order in 1307 may be observed on the tower gates.