Which was the first capital of Islamic common wealth?

Which was the first capital of Islamic common wealth?

اسلامی دولت مشترکہ کا پہلا دارالحکومت کون سا تھا؟
Explanation

Medina is a city in western Saudi Arabia.

The Masjid al-Qiblatain is known as the site where the Prophet Muhammad received the command to change the direction of prayer to Mecca.

Area: 587.9 km²