Mubarak was in court to testify as part of a retrial in which former President Mohamed Morsi and others are accused of orchestrating prison breaks and breaches of Egypt's eastern border during the uprising that forced Mubarak from power in February 2011.
During the hearing, Mubarak refused to answer most questions, saying he needed permission from the military and President Abdel-Fattah el-Sissi, who led the military's 2013 ouster of Morsi, Egypt's first freely elected president.
Egypt's banned Muslim Brotherhood group has vociferously denied the veracity of testimony given by former President Hosni Mubarak regarding Egypt's popular uprising in 2011 that ended the latter's 30-year rule.
Morsi, 67, and the Muslim Brotherhood swiftly rose to power in elections after Mubarak's ouster, only to find themselves imprisoned a year later when millions protested against them for abuse of power, leading the military to overthrow the government. The jailed former leader now faces an array of charges in multiple court cases.
When asked by the judge whether the tunnels were used during the early days of the revolution, Mubarak declined to answer without permission from the president and the commandership of the armed forces to speak on the matter.
He was later sentenced to death in May 2015 along with 105 others in connection with the 2011 jail break, but a higher court later overturned the sentence and ordered a retrial, which is ongoing.
His release sparked the anger of human rights activists and supporters of the revolution, thousands of whom are languishing in prisons as Egypt goes through what rights groups have described as the worst human rights crisis the country has witnessed in its modern history.
In June 2015, a Cairo criminal court sentenced Morsi and five other top Brotherhood figures to death over charges of damaging and setting fire to prison buildings, murder, attempted murder, looting prison weapons depots and releasing prisoners while escaping from the Wadi El-Natroun prison, north of the capital Cairo.
In his testimony, Mubarak said he received information from the then-intelligence chief Omar Sulaiman that 800 militants entered the country on 29 January using smuggling tunnels along the border with the Gaza Strip and were involved in prison breaks and violence in Cairo's Tahrir Square, the epicentre of the revolution.
"If I talk, I will open many subjects that I am barred from discussing without permission", the former president said.
Mubarak was freed last year, ending almost six years of legal proceedings against him.
Mubarak has already served a three-year sentence for embezzling state funds.
Known for his dyed, jet-black hair, the trial saw a rare public appearance by the 90-year-old Mubarak in gray hair.
Morsi was elected president in 2012 in first free elections in Egypt's history one year after Mubarak stepped down due to January 25 popular uprising.