Guillem de Berguedà, or Guilhem de Berguedan in Occitan, was a Catalantroubadour and viscount of Berguedà. He was the most prolific Catalan poet of the twelfth century, though he composed in Occitan, and thirty-one of his poems survive. Most are sirventes, "typically violent and obscene, reflecting his character and turbulent life," but there are a few cansos. Most of what is known about him derives from his vida and his songs. The viscounty of Berguedà was a fief of the County of Cerdagne and the first mention of its dates to the tenth century. In 1131 Guillem's father appears for the first time in a document as rendering homage to Huguet de Mataplana, from he held a fief. It is not until 1138 that the troubadour Guillem first appears in documents, as a child at the side of his father. Later writings indicate that he had three younger brothers, Raymond, Berengar, and Bernard. Some sirventes mention an imprisonment sometime before 1175, but in that year Guillem's adult career as a troubadour commenced. In several sirventes Guillem had insulted and humiliated Ramon Folc, the viscount of Cardona, thus earning Ramon's enmity. The influential viscount of Cardona then sought to turn Alfonso II and his court against the troubadour, but on 3 March 1175 Guillem dishonorably attacked and killed Ramon. His title and fiefs were confiscated and he was consequently exiled from Catalonia and is not heard of again for seven years. During his exile he befriended one Arnau de Castellbò and gathered around himself a small group of loyal supporters. It was probably during this period of exile that he made his pilgrimage to Santiago de Compostela. Guillem's career in Catalonia picks up again in the 1180s. By his father's will of 1183 Guillem stood to inherit the castles of Madrona, Casserres, Puig-reig, Espinalbet, and Montmajor the fief held from Huguet de Mataplana. Through some poems of Bertran de Born, a friend and fellow troubadour, we know that Guillem was an enemy of Alfonso II. The troubadour and the king appear to have made peace by 14 April 1185, when Guillem figured among some followers of the king at a meeting with Richard Coeur de Lion at the Château de Najac, to fortify their alliance against Raymond VI of Toulouse. A. The portrayal is very similar to an earlier one of Bertran de Born. In 1187 Guillem made his first will and testament, which survives in its original. He left Fenollet and the castle of Puig-reig to the Templars and a few minor possessions to the Hospitallers. Other than that all was left to his brother Berengar, who had to donate a quarter to Bernard. Guillem had apparently amassed debts to the Temple and the Hospital: they were allowed to hold their inheritances until the debt was paid. The will permits us to describe Guillem's power in feudal terms: he held five castles with their knights and vassals and corresponding territories, diverse places and manors in upper and lower Berguedà, a fief in Cerdagne, and rights over Caldes and Sentmenat del Vallès. He did not, at the time of the first testament, have a wife or any recognised children. Shortly after the will relations with the king turned sour, signalled by a mocking sirventes against Alfonso. In 1190 Guillem offended the king and the archbishop of Tarragona, Berenguer de Vilademuls, and addressed a sirventes to his friend Arnau de Castellbò at the court of Alfonso VIII of Castile, then allied with Sancho VI of Navarre against the king of Aragon. Guillem's final years were occupied by wars, where he fought on the side of Arnau and Ponç de Cabrera against the king, Bishop Arnau de Preixensof Urgell, and Count Ermengol VIII of Urgell. In 1195 Bertran de Born composed a song repenting of his career of disputes and wars and encouraging Guillem to do the same. There was no time for the poem to have an effect: in 1195 or 1196 Guillem was assassinated by a soldier probably in the employ of one of his numerous enemies.