The origin of the Kingdom of the Mallos is in the dowry that king Peter I of Aragón gives his second wife, Berta, in the occasion of its betrothal that were celebrated the Sunday 16 of August of 1,097 in just consecrated Cathedral of Huesca (1.096).
The dowry included a small territory in the PrePyrenean of Huesca: Agüero, Murillo, Riglos, Marcuello, Ayerbe and some goods in the Hole of Huesca to borders of the Flumen river: Sangarrén and Callén.
The organization this mini-kingdom had established was the same as than greater kingdoms of Aragón or Navarre. Thus we see in dated documents the same day of the wedding that the senior ones of Agüero and Riglos was Fortún López who continued being it until almost its end. In other towns existed seniors who had more than a possession which was granted by Peter I or Alphonso I
The king Peter I dies between the 27 or 30 the september of 1,104 without leaving to descendants. It is for that the Aragonese throne passed to its brother Alphonso I who did not suppose the end of the Kingdom of the Mallos, like it would have been possible to hope. The kingdom of the Mallos continued and it happened the paradox to exist a kingdom within the Kingdom of Aragón by the real grace of the new monarch or "by the love of the previous brother-in-law of the Queen ... in Agüero, Murillo, Riglos, Marcuello, Ayerbe, Sangarrén and Callén (1.105)", said the queen Berta in one of her writings of donation.
Therefore life of The Kingdom of the Mallos lasted approximately from the 16 of August de1.097 to 1.111. We don´t know if The Queen Berta continued living in the Court of Aragón or if she returned to her native mother country, Italy.