Al-qaryata is accusative in the actual phrase.

The Two Explanatory Particles: Ay and An