The issue was referred to the Supreme Court by President Pervez Musharraf who has vowed to rid society of Muslim extremism .