CAIRO — After four months in secret detention, deposed President Mohammed Morsi defiantly rejected a court’s authority to put him on trial Monday, saying he still was Egypt’s leader and that those who overthrew him should face charges instead.

The trial, which was interrupted twice on its first day by shouting in the raucous courtroom, was then adjourned until Jan. 8 to allow lawyers time to review the case against Morsi and his 14 co-defendants — all prominent members of the Muslim Brotherhood.

Morsi, Egypt’s first freely elected president, had been held at an undisclosed location since the military ousted him in a coup July 3. His appearance in court represented a step by the military-backed authorities toward granting him due process in the face of mounting criticism by rights groups.

Defense lawyers said they had access to Morsi and his co-defendants during a recess Monday and that the judge has agreed to allow them access to their clients in jail.

The 62-year-old Morsi, who wore a dark blue suit, light shirt and no tie, was feisty and healthy-looking during his court appearance. He had refused to wear a prison uniform as the judge had ordered, according to security officials, as part of his rejection of the trial’s legitimacy.

The dispute had delayed the start of the session by two hours, according to officials who spoke on condition of anonymity because they were not authorized to talk to the media.

Morsi and his co-defendants face charges of inciting the killing of protesters who massed outside the presidential palace in December and demanded he call off a referendum on a new constitution drafted by his Islamist allies. Brotherhood members attacked a sit-in by the protesters, sparking clashes that left 10 people dead.

Silent video broadcast on state TV showed Morsi arriving in a minibus outside the makeshift courtroom at a police academy in eastern Cairo, buttoning a dark blue jacket as he stepped from the vehicle and flanked by burly policemen.

Another clip from inside the courtroom showed his co-defendants standing — all in white prison uniforms — in two lines like a guard of honor, applauding Morsi as he joined them in the defendants’ cage. His co-defendants, with their backs to the court, raised their hands in a four-fingered gesture, a sign commemorating the hundreds of his supporters killed when security forces moved to clear pro-Morsi sit-in sites in August.

Reporters in the courtroom were not allowed to bring cameras, computers or cellphones as authorities sought to keep tight control on the proceedings, clearly wanting to prevent protests and clashes in the streets.

The case against Morsi and the other defendants is rooted in complaints filed against them by rights activists at the time of the December riots. It is not related to events stemming from the coup, contrary to what Morsi’s supporters maintain.

“This case (of violence) is a turning point and the beginning of the downfall of Morsi,” said Ragia Omran, a civil lawyer who represents two of the victims.

If convicted, Morsi and the other defendants could face the death penalty.

During Monday’s session, Morsi rejected the proceedings and said he had been forced to attend.

When Judge Ahmed Sabry Youssef called out Morsi’s name as one of the defendants, the ousted president, to the cheers of defense lawyers, indignantly replied: “I am Mohammed Morsi, the president of the republic.”

The judge interrupted him, saying rules for addressing the court must be observed.

Morsi still went on: “I am Dr. Mohammed Morsi, the president of the republic. I am here by force and against my will. The coup is a crime and treason.”

Morsi later refused to enter a plea and demanded that he be given a microphone, although his voice was loud enough for everyone in the lecture hall converted into a courtroom to hear.

“This is not my court,” Morsi went on. “This court, with all due respect, doesn’t have jurisdiction over the president. There is a military coup in this country. The leaders of this coup must be brought to trial according to the constitution.”

Similarly defiant was Mohammed el-Beltagy, a senior Brotherhood leader who repeatedly interrupted the judge. At one point, he said he held the judge personally responsible for what he said was his flawed referral to trial.

“You are not paying attention. You will get the chance to speak,” the judge told him.

“It is you who is not paying attention,” snapped el-Beltagy.

The raucous session reflected the highly charged atmosphere of a nation deeply polarized — with Morsi’s Islamist supporters on one side and the military-backed administration and moderate Egyptians who support it on the other.

The judge had to adjourn the hearing twice because of cheering and chanting in the court. Defendants chanted, “Down, down with military rule!” The defense lawyers chanted “The people greet the steadfastness of the president!” and some of the Egyptian reporters covering the session responded with: “Execution, execution!”

After the adjournment, Morsi was taken to Bourg el-Arab, a prison in the desert near the Mediterranean city of Alexandra. His co-defendants are being held in a prison near Cairo.

The military says it removed Morsi only after millions of Egyptians marched in the streets demanding his ouster, accusing him and the Brotherhood of trying to subvert the law and impose their will on the country. Morsi’s supporters accuse the military of crushing Egypt’s nascent democracy by overturning the results of multiple elections won by the Islamists since the 2011 fall of autocrat Hosni Mubarak in a popular uprising.

Rights advocates have expressed concern about the trial’s fairness, as it is taking place in the atmosphere of a widescale crackdown on the Brotherhood and its Islamist allies in which several thousand have been arrested and hundreds killed. The judicial system is stacked with Morsi’s adversaries, with whom he clashed repeatedly during his year in office.

Authorities on Sunday switched the location of the trial to the police academy, a move apparently aimed at thwarting mass rallies planned by Morsi’s supporters.

Security was tight, with hundreds of black-clad riot police backed by armored vehicles deployed around the sprawling complex and helicopters hovering above. The final stretch of road leading to the academy was sealed off, with only authorized personnel and accredited journalists allowed to approach.

The academy also was being used for the re-trial of Mubarak, who is charged with failing to stop the killing of some 900 protesters during the 18-day uprising that toppled his 29-year regime. But unlike Mubarak’s first trial, the proceedings against Morsi were not broadcast live.

Several hundred Morsi supporters rallied outside the police academy, carrying posters with his photo. They also chanted slogans against Gen. Abdel-Fattah el-Sissi, the military chief who led the coup.

Police fired in the air to separate them from Morsi’s opponents. They also used tear gas to end clashes between the two sides at a major court complex in downtown Cairo. Police also used tear gas to disperse thousands of Morsi supporters in the southern city of Assiut.