Castell Templer de Barbens is a medieval fortification in Lleida with documented origins predating the 12th century, becoming Knights Templar property in 1168 after a 1166 commandery establishment. The castle house was likely constructed at the 11th century's end and served as a typical rural Templar convent functioning as a fortified agricultural administrative center for a substantial territorial domain. Between 1172 and 1181, the Templars significantly expanded holdings through new concessions and purchases. After the Knights Templar order's 14th-century dissolution, Barbens passed to the Order of the Hospital of Saint John of Jerusalem; today, the castle grounds are occupied by municipal buildings, preserving this important chapter of Catalonia's medieval military and religious heritage.