an immense wall ran around the perimeter behind it , and mosques , churches , and palacesin various stages of destruction and repairdotted the landscape like a visual account of mans preoccupation with divinity .