Saudi Arabia has vowed to crack down on Islamic militants and condemned the attack.