(CNN) -- Saudi Arabia's ambassador to Egypt returned to Cairo on Saturday after tensions briefly spurred the kingdom to pull its envoys and shutter its missions, Saudi state media reported.
Ambassador Ahmad Kattan is expected to resume his duties on Sunday, the Saudi Press Agency said.
Saudi Arabia called back Kattan and closed its embassy and consulates last Sunday after raucous protests in Cairo over the imprisonment of Ahmed Mohammed el-Gezawi, an Egyptian human rights lawyer.
Throngs of Egyptians had gathered in front of the Saudi Embassy, calling for the release of el-Gezawi.
The decision to pull out Saudi diplomats came after protesters' "attempts to storm and threaten the security and safety of its (embassy) employees," the Saudi Press Agency said.
Saudi officials say el-Gezawi is accused of trying to smuggle thousands of pills into the country.
The Egyptian Organization for Human Rights said el-Gezawi had been traveling during Umrah, a minor pilgrimage to Mecca, when he was detained.
"What has happened in the recent days of repercussions in the relationship between the two countries is painful to every honorable Saudi and Egyptian citizen, and our decision to recall the ambassador and the closure of the embassy were only to protect its employees from other situations that could have developed with dire consequences," the Saudi Press Agency said, quoting King Abdullah bin Abdul Aziz.
"We will not allow this incidental crisis to prolong."
The protests and the Saudi reaction appear to have again ratcheted up long-standing tensions between the two Middle Eastern nations.
The strains can be traced to 1979, when the kingdom broke off diplomatic relations after Egypt inked a peace deal with Israel based on the Camp David Accords. The ties were restored in November 1987.
Egypt, the most populous Arab country, has often engaged in "a subtle competition" with its Saudi counterparts "over this question of regional leadership," said Steven Cook, senior fellow at the Council on Foreign Relations.
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.