"The prime minister was subjected to an insult. It was unacceptable," said the official on condition of anonymity because of the subject's sensitivity.

Morsi appointed Mohammed Rafaat Abdel Wahad Shehata as the interim head of General Intelligence.

Earlier on Wednesday, Muwafi, himself a former governor of North Sinai, issued a rare public statement saying his agency had forewarned of the weekend attack.

But he said the intelligence did not specify where the attack would take place and he had passed it on to the "relevant authorities," adding that his powerful agency's role was only to collect information.

Morsi is thought likely to have reached the decisions with the military top command, which ruled the country between president Hosni Mubarak's ouster in February 2011 and Morsi's inauguration as his successor in June.