Muhammad and his companions went through the Arabian Peninsula in the following years and united the divided tribes of Arabia under one flag. This led to Medina becoming the capital of the newly established Islamic state ruled by the Prophet Muhammad.