President Hosni Mubarak of Egypt appeared on television late Friday night and ordered his government to resign, but backed his security forces’ attempts to contain the surging unrest around the country that has shaken his 28-year authoritarian rule. He did not offer to step down himself and spent much of the short speech explaining the need for stability, saying that while he was “on the side of freedom,” his job was to protect the nation from chaos. Several hours earlier, he had ordered the military into the streets to reinforce police struggling to contain riots by tens of thousands of Egyptians. The president also imposed an overnight curfew nationwide, but demonstrators defied the order, remaining in the streets of the capital, setting fire to police cars and burning the ruling party headquarters to the ground. As smoke from the fires blanketed one of the city’s main streets along the Nile, crowds rushed the Interior Ministry and state television headquarters, but the military moved into the buildings to establish control. Protesters also tried to attack the American Embassy.