Complex sentence: The feudal overlord of this territory was at first the Count of Urgell; however in 988 the count, Borrell II, gave Andorra to the Diocese of Urgell in exchange for land in Cerdanya.
Split into simpler sentences: The feudal overlord of this territory was at first the Count of Urgell. In 988, however, the count, Borrell II, gave Andorra to the Diocese of Urgell in exchange for land in Cerdanya.