Trujillo was settled on a granite batholith during Prehistoric times. In Roman times the town was known as Turgalium and became a prefecture stipendiary of the Lusitanian capital, Emerita Augusta (today's Merida). Later it was colonised by barbarian tribes (mainly Visigoths) although the prevalence of the population would still have been Hispano-Roman.
With the Muslim invasion and conquest in 711, it became one of the main towns in the region, governed by the Taifa based in Madrid. This taifa was subject to the Umayyad Emirate and the subsequent Caliphate ruled until the middle of the 11th Century. During this time the ethnic tensions between the Berbers and Arabs weakened the Caliphate militarily while the Reconquista gained success to the north of Extremedura in Castile. During this time the Berber Almohads took control of Trujillo and it environs.
During the time of Almohad rule, wars with Portugal, Castile, and León guaranteed that the possession of Trujillo was tenuous. Rule alternated between these kingdoms and the Almohads returning for the last time to the Muslims in 1187.