Egypt's official state news agency said a Libyan judge has been posted at the embassy in Cairo for almost a year to coordinate with Egypt's Justice Ministry.
During the siege before dawn Tuesday, Qaddaf al-Dam said in a telephone call to a privately-owned Egyptian satellite TV channel, Dream, that he was invited to Cairo by the military council that took power after the overthrow of President Hosni Mubarak.
"We came here with an invitation from the Foreign Ministry and the military council ... We are not terrorists to be ambushed like this," he said. "We will defend our house until the end."
Mubarak, who like Gadhafi was ousted in a 2011 Arab Spring uprising, had close ties to the Libyan dictator. Human rights groups said Cairo allowed Libyan intelligence to kidnap members of the anti-Gadhafi opposition, notably dissident Mansour Kikhia, who disappeared in 1993. His remains were found in a house in Tripoli in September.
Even after Mubarak's overthrow, Cairo appeared reluctant to hand over wanted Gadhafi officials, possibly because they had ties with Egypt's intelligence and security agencies or investments in the country.
The move against Qaddaf al-Dam came shortly after Libya's Prime Minister Ali Zidan met with Egypt's President Mohammed Morsi in Cairo. According to Egyptian media reports, Zidan demanded that Egypt hand over wanted men in return for greater Libyan investment in Egypt and easing the entry of Egyptian workers to Libya.
Hundreds of thousands of Egyptians work in Libya. Tensions rose in past weeks after Libyan militias arrested scores of Egyptian Christians and accused them of spreading Christianity. After their release, the Christians said they were tortured while in detention. Egypt's Foreign Ministry criticized the arrests, and Christians demonstrated outside the Libyan Embassy in Cairo after one of the detainees died in prison.