This verse was revealed in Makkah, Scholar Mawdudi comments:
“The very first verse indicates that this Surah was revealed on the occasion of Mi`raj (Ascension). According to the Traditions and books on the life of the Holy Prophet, this event happened one year before Hijrah. Thus, this Surah is one of those which were revealed in the last stage of Prophethood at Makkah.” (Sayyid Abul Ala Maududi – Tafhim al-Qur’an – The Meaning of the Qur’an – Onine Source)
Similarly, this is also the opinion of Islamic scholars, Shaykh Ashiq Ilahi Madni  and Dr. Muhammad Asad  that it was revealed during Makkah.
“And when We intend to destroy a city, We command its affluent but they defiantly disobey therein; so the word comes into effect upon it, and We destroy it with [complete] destruction.” – Quran 17:16
17:16 – The verse speaks about the people in ancient past how they spread evil on earth, spreading corruption and tyranny. When they were told to follow the righteous path in being good, they disobeyed and their sins increased.
Some have used the above verse in claiming that Muslims are allowed to destroy cities. This is a wrong and twisted interpretation. The Prophet nor the Companions of Muhammed (p) interpreted it as such.
Furthermore, The Prophet (p) ascending to heaven was done during his time in Makkah. Fighting therein was not prescribed to the Muslims. Hence, the verse relates to the destruction God brings. Humans have no involvement in this matter.
Don’t forget to follow Discover The Truth on Facebook and Twitter. PLEASE help spread the word by sharing our articles on your favourite social networks.
 Shaykh Ashiq Ilahi Madni:
“ALLAH TRANSPORTS THE HOLY PROPHET IN A SINGLE NIGHT FROM THE MASJIDUL HARAM TO MASJIDUL AQSA AND THEN TO THE SEVEN HEAVENS
This verse is the beginning of Surah Bani Isra’il also termed Surah Isra because of the description of the miraculous journey of the Holy Prophet to the heavens.”
Illuminating Discourses on the Noble Quran – Tafseer Anwarul Bayan – by Shaykh Ashiq Ilahi Madni (r.a), volume 3, page 235
 Dr. Muhammad Asad:
“Mecca Period: THE REFERENCE to the mystic Night Journey in the first verse of this surah (see Appendix
IV) shows that it cannot have been revealed earlier than in the last year before the hijrah; Suyuti
places it chronologically between surah 28 and the group of surahs 10-12. The assumption of
some authorities that certain of its verses belong to a much later time – namely, the Medina”
period -is purely conjectural and may, therefore, be disregarded.” (The Message of The Quran, by Dr. Muhammad Asad, page 572 Online Source)