Located in the middle of an intersection of the valleys, Lourdes was inhabited though - as you know - since prehistoric times.
According to the legend owes its name - and its coat of arms (an eagle with a silver trout in its beak) - a fact that would have happened at the time of the reign of Charlemagne.
A buck named Mirat had conquered the city trincerandovisi inside. Charlemagne, a veteran of the Spanish campaign, shortly after the Battle of Roncesvalles, besieged with his army.
At this point enters the field the legend that he wants as huge eagle had been seen by the besieged, while flying with a trout in its beak. The bird would have done the same gift of trout besieged, who made it reach a part of the emperor, as a sign of their resistance.
Charlemagne, including the difficulty of the conquest (and even convinced by Turpin, bishop of Le Puy-en-Velay), would propose at this point to Mirat an agreement: the possession of the city to go against the acceptance of the Virgin (in the sense to renounce Islam and convert to Catholicism). Mirat - according to legend - put down their weapons at the foot of the Black Virgin of Puy being baptized with the name of Lorus, which will then be made to derive the name of Lourdes
.