 Portugal, formerly part of León, gained independence in 1128 after a split in the inheritance of the daughters of Alfonso VI and remained independent throughout the Reconquista.All these different kingdoms were ruled together, or separately in personal union, but maintained their particular ethnic differences, regardless of similarities through common origins or borrowed customs.These kingdoms sometimes collaborated when they fought against Al-Andalus and sometimes allied themselves with the Muslims against rival Christian neighbors.