Cairo (CNN) -- The Saudi ambassador to Egypt left Cairo for home on Sunday amid tensions between the two Arab powers, the official Saudi news agency reported.
Saudi Arabia announced a day earlier that it was recalling Ambassador Ahmed Qattan, closing its embassy in Cairo and shuttering consulates elsewhere in the country.
The kingdom carried through on its plan despite a phone call from Egypt's military leader to the king of Saudi Arabia to try to defuse the dispute.
"Field Marshal Hussein Tantawi telephoned the Saudi king on Saturday in order to contain the situation resulting from the arrest of Egyptian citizen Ahmed Mohammed el-Gezawi," Egypt's EGYNews reported Sunday.
Saudi Arabia was reacting to protests in the Egyptian capital over a imprisonment of el-Gezawi, a human rights lawyer who was detained earlier this month.
Throngs of Egyptians had gathered in front of the Saudi Embassy this week, calling for the release of el-Gezawi.
The decision to pull out Saudi diplomats came after protester "attempts to storm and threaten the security and safety of its (embassy) employees," according to the Saudi Press Agency.
Saudi officials say el-Gezawi was arrested for allegedly trying to smuggle thousands of pills into the country.
But the Egyptian Organization for Human Rights say el-Gezawi had been traveling on a pilgrimage to Mecca when he was detained.
The Cairo-based group credited the activist for demanding better treatment of Saudi-held Egyptian detainees and criticizing the kingdom over alleged human rights abuses.
El-Gezawi has since been sentenced to flogging and faces a year behind bars, the group reported.
Video of the demonstrations in Cairo was posted online earlier this week and showed sign-wielding crowds chanting slogans in front of the Saudi Embassy.
"Say it, don't be afraid, the Egyptian will be lashed," the crowd chanted. "We will lash the ambassador! Lash us, imprison us! Tomorrow the revolution will be in Medina."
In a statement Saturday, the Egyptian government denounced "these irresponsible acts," saying that it regrets "the individual incidents, which were conducted by some citizens against the Embassy of the Kingdom of Saudi Arabia in Cairo."
"The incidents only reflect only the view of those who carried them out and nothing more," the statement said.
The protests and Saturday's decision by Saudi authorities to remove diplomatic personnel from the country appear to have again ratcheted up longstanding tensions between the two Middle Eastern nations.
"It's a relationship that's been flawed," said Steven Cook, senior fellow at the Council on Foreign Relations. "Especially since the uprising, many Egyptians regard Saudis as a counterrevolutionary force in the region."
Relations between the two countries soured in 1979 when the kingdom broke off diplomatic relations with Egypt after it inked a peace deal with Israel following the Camp David Accords. The ties were later restored in November 1987.
Egypt, the most populous Arab country, has often engaged in "a subtle competition" with their Saudi counterparts "over this question of regional leadership," Cook said.
Egypt erupted in protest last year during 18 days of demonstrations in Cairo's Tahrir Square after similar uprisings in neighboring Tunisia, ultimately ousting Egypt's longtime president Hosni Mubarak after nearly three decades in power.
"The Saudis were not enthusiastic about their uprising," Cook said of Egypt, pointing to apparent concerns among elites in the oil-rich kingdom over their own grip on power. "And they were angry at the United States for its role in supporting the movement."
In February 2011, President Barack Obama called for orderly transition in Egypt to a fully representative democracy, saying the transition "must be meaningful, it must be peaceful and it must begin now."
CNN's Saad Abedine, Mohamed Fadel Fahmy, Caroline Faraj and Salma Abdelaziz contributed to this report.