Salamanca is located in the central plateau of the Iberian Peninsula, in a hilly region inside the Duero Valley.
Known as Helmantica in ancient times, the city was originally a fort built by one of the Celtic tribes of the Duero Valley. It was conquered by the Barcas in the Carthaginian expansion in Iberia during the III century BC, and later fell into the hands of the Romans after the Second Punic War. Under roman rule, Helmantica grew as a relevant trade hub thanks to its strategic location: a ford of the Tormes river and a stopover in the important way known as the Silver Road, which stretched from Mérida to Astorga.
When the Roman Empire fell, the town was taken by the Alans first, then by the Visigoths. It retained a certain degree of importance for about three centuries, before being conquered again by the moorish army of Musa bin Nusayr in 712. As it happened with Segovia, Salamanca was mostly depopulated in the following centuries; it was located in a specific region (between the Duero and Tormes rivers) that became a no-man's land territory where frequent skirmishes and battles took place.
The city started a slow recovery in the X century but it wouldn't be until the late XI century, after the conquest of Toledo by Alfonso VI of Castille and Leon, when a true repopulation effort was done. Salamanca remained under leonese rule after the two kingdoms parted ways in 1157, something that wasn't exactly welcomed by its population. Eventually, a revolt erupted but it was swiftly supressed and the town was forced to stay loyal to the leonese crown.