During the course of the 10th century, the personal ties and bonds of homage between the Catalan counts and the Carolingian monarchy came to an end and a policy of good neighbourly relations with Cordoba was established. In 985, a pillaging raid led by Almanzor reached Barcelona. In 988, Count Borrell II demanded help from the Frankish court of Hugues Capet to rebuild the city and defend his lands. When he did not receive the aid he requested, Borrell II did not renew his oath of loyalty to the Frankish monarch, leading to de facto independence. From that time forth, the Catalan counts ruled with complete sovereignty over their lands.