Ramon Berenguer IV conquered Tortosa in 1148 and Lleida in 1149. Part of the Andalusian population remained in each of the cities. Miravet and Siurana, the last bastions of al-Andalus, surrendered in 1153. The increase in population and the granting of franchises contributed towards the repopulation of the new lands. The establishment of religious communities within the conquered lands was promoted. Poblet, Santes Creus and Vallbona de les Monges increased their wealth through contributions from the counts as well as private individuals. The Templars organised the defence of the new frontiers through a network of castles and commanderies.