CAIRO — Hours after Egypt’s Parliament met in defiance of a court order, the country’s highest court ruled Tuesday that President Mohammed Morsi had ordered the legislative body back in session illegally, a political tit for tat that underscored how the ruling military council, the court and Egypt’s first democratically elected president are embroiled in a public battle for power.

Thousands took to the streets in support of Morsi’s order reinstating the lower house of Parliament and celebrated after the legislative body’s first session was over. Morsi on Sunday had ordered it to meet despite an earlier court ruling that dissolved the legislative body, which is dominated by members of the Muslim Brotherhood, the Islamist group Morsi was a member of for decades until he fulfilled a campaign promise to leave the group after his election.

The parliamentary speaker, Saad el Katatni, held a symbolic session that lasted less than an hour, and argued in a brief speech that Morsi’s order hadn’t contravened the court.

“The Parliament knows quite well its duties and rights and doesn’t interfere in the judiciary’s work,” he said.

Shortly afterward, the court ruled that Morsi had acted illegally in calling the Parliament into session, sharpening a confrontation that has existed since the three-decade regime of former President Hosni Mubarak, who resigned in February 2011 after popular protests. The court and the military council, made up of Mubarak appointees, are facing off against Islamist parties led by the Muslim Brotherhood, long suppressed by Mubarak but big victors in the recent parliamentary and presidential elections.

U.S. officials are concerned about the crisis, which threatens to plunge Egypt into prolonged instability. Egypt’s prominent liberal parties, including supporters of the anti-Mubarak revolution but a distinct minority in Parliament, boycotted Tuesday’s session, indicating deep divisions within Parliament.

“We strongly urge dialogue and concerted effort on the part of all to try to deal with the problems that are understandable but have to be resolved in order to avoid any kind of difficulties that could derail the transition that is going on,” Secretary of State Hillary Clinton said in Vietnam, where she was making an official visit.