The Prophet Muhammad died in Medina, leaving the leadership of a rapidly expanding religious and political community in dispute.