Bernard (or Bernat) of Septimania (795–844), son of William of Gellone and cousin of Charlemagne, was the Duke of Septimania and Count of Barcelona from 826 to 832 and again from 835 to his execution, and also Count of Carcassonne from 837. He was appointed to succeed the third Count of Barcelona, Rampon. During his career, Bernard was one of the closest counsellors of the Emperor Louis the Pious, a leading proponent of the war against the Moors, and was an opponent of the interests of the local Visigothic nobility in Iberia.