 In his testament Borrell II, who died in 992, gave Barcelona, Girona and Osona to Ramon Borrell (992-1017), while Urgell went to Ermengol I (992-1010), so that the Count of Urgell title became separated from the House of Barcelona.Thus the first dynasty of Urgell began with Ermengol I.The first dynasty is also known as Barcelona-Urgell.