By the Pact of Madrid, Peter was constrained to aid Alfonso XI of Castile in his successful attack on Algeciras (1344) and his failed attempt on Gibraltar (1349) by defending against a Moroccan counterattack.
I henhold til en pagt med Kastilien, var Peter forpligtet til at hjælpe Alfons 11. af Kastilien i hans succesfulde angreb på Algeciras (1344) og hans mislykkede angreb på Gibraltar (1349) ved at forsvare mod et marokkansk modangreb.