Amir of Medina During the Battle of Badr
During the Battle of Badr, the Holy Prophet (sa) appointed Hazrat Abdullah bin Maktoom as the Amir in his absence, but when he reached a place called Roha, which is thirty-six miles from Medina, then perhaps owing to the fact that Abdullah was blind and anticipating the arrival of the Meccan Army, the Holy Prophet (sa) thought that the arrangements in Medina should be made stronger. Therefore, he appointed Abu Lubabah (ra) bin Munzir as the Amir of Medina and sent him back. The Holy Prophet (sa) instructed that Hazrat Abdullah bin Maktoom should be the Imam for prayers, and all the administrative duties should be carried out by Hazrat Abu Lubabah (ra).
(Seerat Khatam-un-Nabiyeen, Hazrat Mirza Bashir Ahmad Sahib (ra), p. 354)
In any case, this is how he returned after travelling half way.
Ibn-e-Ishaq says that the Holy Prophet (sa) assigned a portion for him from the spoils of war.
(Al-Asaaba fi Tameez Al-Sahaba, Vol. 7, p. 290, Abu Lababa bin Abdul Munzir, Dar-ul-Kutub Al-Ilmiyah, Beirut, 1995)