A supporter of Egypt’s ousted President Mohammed Morsi raises his poster and her hand with four raised fingers, a symbol for Morsi supporters, during a protest in Cairo last Friday.

CAIRO — A court declared that Egypt’s 3-month-old state of emergency expired Tuesday, two days earlier than expected, throwing the government and security agencies into confusion amid worries that its lifting could add new fire to protests by supporters of ousted President Mohammed Morsi.

Morsi, meanwhile, held his first extensive meeting with lawyers in a prison near the Mediterranean city of Alexandria. He had been held in secret military detention with almost no contact with the outside world since he was ousted in a July 3 popularly backed coup, but he was moved to a regular prison last week after the first session of his trial on charges of inciting murder.

Morsi handed the lawyers, from the Muslim Brotherhood and its allies, a statement addressing the Egyptian people and “all parties” to be announced by the lawyers on Wednesday, Morsi’s son Osama, a lawyer who was among those who met him, told The Associated Press.

He said his father is still refusing to allow any lawyer to represent him in the trial because he insists he remains president and does not recognize the tribunal.

The state of emergency and a nighttime curfew imposed along with it have been aimed at helping authorities tighten their security grip and control on near-daily protests that frequently descended into violence by pro-Morsi supporters and his Muslim Brotherhood demanding his reinstatement and the reversal of what they call an illegal coup against democracy.

On Monday, Interior Minister Mahmoud Ibrahim, who heads the security forces, said the state of emergency would expire on Thursday and that security reinforcements would deploy in the streets at that time — a sign of the worries over intensified protests.

The surprise ruling by the Cairo Administrative Court ordering the lifting Tuesday appeared to have caught the government off guard — and authorities said they were not immediately implementing it until the court formally notifies them of the decision.

The confusion came because the state of emergency was initially announced for a month on Aug. 14. But the government renewed it for another two months on Sept. 12. The court said that means it ends on Nov. 12, not Nov. 14.

The Cabinet put out a statement saying it will abide by the ruling, though it said it will wait for the details of the ruling to issue the verdict in writing. It was not clear what would happen if the court did not do so on Tuesday.

The spokesman of the military, Col. Ahmed Mohammed Ali, said the military has not been “notified officially of any court ruling so far.” In a statement, he said the curfew — which begins at 1 a.m. — will be implemented as planned unless the written ruling is issued.

The state news agency also cited an unidentified high ranking Interior Ministry official saying the ministry has not received the court’s ruling. It said security forces have started deploying to secure the Egyptian street.

It was not clear how binding the ruling is. The court said its decision came in response to a lawsuit questioning legality of the state of emergency, and the court rejected the lawsuit saying that it has already expired. A senior judge in the court, Abdel-Maguid al-Mouqanan, told the state news agency that the ruling doesn’t obligate the government to put an end to the state of emergency.