Saudi Arabia has recalled its ambassador from Egypt and threatened to close its embassy and all its consulates in protest at a series of demonstrations against the arrest of an Egyptian man.

The Saudi state news agency said the reason behind the diplomatic move was "unjustified protests" in Egypt and attempts to storm the Saudi embassy and consulates which "threatened the safety of its employees".

The unexpected escalation followed days of protests by hundreds of Egyptians outside the Saudi Embassy in Cairo and consulates in other cities to demand the release of Ahmed el-Gezawi. Relatives and human rights groups say he was detained for insulting King Abdullah while Saudi authorities said he was arrested for trying to smuggle anti-anxiety drugs.

The arrest has prompted the worst diplomatic row between the two regional powerhouses since Saudi Arabia and other Arab countries broke off diplomatic ties with Egypt after it signed a peace deal with Israel in 1979. Diplomatic relations were restored in 1987.

Saudi Arabia said on Saturday it had recalled its ambassador from Egypt for "consultation" and would close its embassy and consulates in the Arab nation.

Field Marshal Mohamed Hussein Tantawi, the head of the army council governing Egypt, was working to "heal the rift".

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.