Alcúdia’s name derives from al-kudja, Arabic for "on the hill"; referring to a Moorish farmstead created very close to where the ancient village of Pollentia had been. In 1229, the Moors were attacked by the bloody King James I of Aragon, who occupied the area. In 1298, King James II of Aragon bought the farmstead Alcúdia and founded the new town. A church, a graveyard, a house for priests, and a square were created in the same year. The construction of the walls was also initiated at the same time and finished in 1362. The city plan that was made at the time remains the same for Alcúdia today. During the Renaissance, walls were reconstructed, and a second wall was constructed outside the first one. This wall has since been torn down and only details show where it once was.