Begun in the late 12th century, the Hassan tower was designed to be the minaret of what became the world's second largest mosque (second to the one in Samarra, Iraq).
The Almohad ruler, Yaqub al-Mansur, designed the minaret to become 80 metres tall, with a unique design for each of its facades. When he died in 1199, somehow the whole building process came to a dramatic halt. The minaret was then 50 metres high, the same size as it has today.
The mosque came into use, having its columns completed, and with cedar roof. The gigantic earthquake of 1755, which also destroyed central Lisbon, destroyed the structure to the condition that it now is in.
The size of the mosque appears to have been quite out of proportions to the size of its city. Since it could receive up to 20,000 worshippers at a time, the city ought to have been one of 100,000 or more. Only in very modern times did Rabat climb to such a level. A few centuries after the building came to a halt, Rabat was merely a village.