The explosion happened shortly before President Hamid Karzai began a speech to open the fourth session of the Afghan parliament in Kabul.