Gradually, they established a science of law that became known as the usul al-fiqh. The goal was to ensure that legal rules and practices were firmly based upon the practices and words of the Prophet and those closest to him by using proper legal reasoning.