Amir of Medina During the Battle of Tabuk
With regards to the Battle of Tabuk which took place in Rajab 9 AH, Mus‘ab (ra) bin Saad narrates an incident on the authority of his father that when the Holy Prophet (sa) departed for Tabuk, he appointed Hazrat Ali (ra) in charge of Medina in his absence. Hazrat Ali (ra) said, “Are you leaving me behind with the women and children?” The Holy Prophet (sa) stated, “Are you not pleased that you have the same relation to me that Aaronas had with Moses (as), with the exception that there is no prophet after me.”
(Sirat Khatamun-Nabiyyin, Hazrat Mirza Bashir Ahmad (ra), p. 842) (Sahih al-Bukhari, Kitab al-Maghazi, Bab Ghazwat Tabuk wa hiya Ghazwat al-Usrah, Hadith 4416)