Suyuti places most of this surah chronologically in the middle of the Medina period, excepting verses 39-40 - which (according to Ibn Abbas, as quoted by Tabari) were revealed during the Prophet's exodus from Mecca to Medina - as well as some other verses said to have been revealed at the time of he battle of Badr (in the year 2 H.). As against this, however, most of the classical Qur'an commentators (e.g., Baghawi, Zamakhshari, Razi. Baydawi) describe it unequivocally as a Meccan revelation, with the possible exception of six verses (19-24) which, according to some authorities, may belong to the Medina period. On the whole, it is most probable that by far the largest part of the surah is Meccan, while the rest was revealed shortly after the Prophets arrival at Medina. The title is derived from the reference, in verses 25 ff., to the Mecca pilgrimage (al-hajj) and some of the rituals connected therewith.
O MEN! Be conscious of your Sustainer: for, verily, the violent convulsion of the Last Hour will be an awesome thing!