Bay'ah in Islam is a pledge of allegiance to a Muslim leader. It was practiced by the prophet Muhammad. It is sometimes done under a written agreement by citizens as long as the leader follows the Sharia, the people have to continue to pledge allegiance to him. It is still practiced in Saudi Arabia and Sudan. In Morocco, bay'ah is only compulsory for the royal family of the country.