CAIRO – Egypt’s military rulers took sweeping action to dismantle the autocratic legacy of former President Hosni Mubarak on Sunday, dissolving parliament, suspending the constitution and promising elections in moves cautiously welcomed by pro-democracy protesters.

They also met with representatives of the broad-based youth movement that brought down the government after an 18-day uprising that transfixed the world.

The caretaker government, backed by the military, said restoring security was a top priority even as labor unrest reflected one of the many challenges of steering the Arab world’s biggest nation toward stability and democracy.

On Sunday, prominent activist Wael Ghonim posted on a Facebook page he manages notes from a meeting between members of the military council and youth representatives, which he described as encouraging.

The military defended the caretaker government, stocked with Mubarak loyalists, as necessary for now in the interests of stability but pledged to soon change it, Ghonim and another protester, Amr Salama, said in the statement.

“They said they will go after corrupt people no matter what their position current or previous,” the statement said. Amendments to the much-reviled constitution will be prepared by an independent committee over the next 10 days and presented for approval in a popular referendum in two months, they said.

The military also encouraged the youth groups to consider forming political parties — something very difficult to do under the old system — and pledged to meet with them regularly.

“We felt a sincere desire to protect the gains of the revolution and an unprecedented respect for the right of young Egyptians to express their opinions,” Ghonim said.

The caretaker government met for the first time, and employees removed a huge framed photograph of Mubarak from the meeting room before they convened.

The crowds in the protest encampment that became a symbol of defiance against the government thinned out Sunday — the first working day since the regime fell. Traffic flowed through the downtown area for the first time in weeks. Troops cleared most of the makeshift tents and scuffled with holdout activists.

The protesters have been pressing the ruling military council, led by Defense Minister Hussein Tantawi, to immediately move forward with the transition by appointing a presidential council, dissolving parliament and releasing political prisoners.

Thousands have remained in Tahrir Square and some want to keep up the pressure for immediate steps, including repeal of repressive emergency laws that give police broad power.

The 18-member Supreme Council of the Armed Forces allayed some concerns by dismissing the legislature, packed with Mubarak loyalists, and sidelining the constitution, used by Mubarak to buttress his rule.

The military council, which has issued a stream of communiques since taking power, said parliamentary and presidential elections will be held, but did not set a timetable. It said it will run the country for six months, or until elections can be held.

It said it will represent Egypt in all internal and external affairs and proclaimed the right to set temporary laws. It was expected to clarify the scope of its legal authority as the complex transition unfolds and the role of the judiciary remains unclear.

It said it was forming a committee to amend the constitution and set rules for a popular referendum to endorse the amendments.

Protesters are demanding that the constitution be amended to impose term limits on the president, open up competition for the presidency, and remove restrictions on creating political parties. Others want an entirely new constitution.

Judge Hisham Bastawisi, a reformist judge, said the military measures “should open the door for free formation of political parties and open the way for any Egyptian to run for presidential elections.”

Both the lower and upper houses of parliament are being dissolved. The last parliamentary elections in November and December were marked by allegations of fraud by the ruling party, which was accused of virtually shutting out the opposition.

The military council includes the chief of staff and commanders of each branch of the armed forces. It took power after protesters’ pleas, and promised reform. The institution, however, was tightly bound to Mubarak’s ruling system, and it has substantial economic interests that it will likely seek to preserve.

The caretaker Cabinet, appointed by Mubarak shortly after the pro-democracy protests began on Jan. 25, will remain in place until a new Cabinet is formed — a step expected to happen after elections.

“Our concern now … is security, to bring security back to the Egyptian citizen,” Prime Minister Ahmed Shafiq said Sunday after the Cabinet met for the first time since Mubarak was ousted.