Ibn Hajar al-Asqalani
The alternative opinion mainly put forth by Ibn Hajar al-Asqalani is that it was sung for Muhammad upon his arrival at Medina, to welcome him after completing the Battle of Tabuk.