CAIRO — Egypt’s military deployed on the streets of Cairo to enforce a nighttime curfew as the sun set today on a day of rioting and chaos that was a major escalation in the challenge to authoritarian President Hosni Mubarak’s 30-year rule.

Thousands defied the night curfew in the capital Cairo and were trying to storm two major government buildings – the state TV and the Foreign Ministry. Others were praying on the streets of Cairo after nightfall.

Flames rose up across a number of cities from burning tires and police cars. Even the ruling party headquarters in Cairo was ablaze in the outpouring of rage, bitterness and utter frustration with a regime seen as corrupt, heavy-handed and neglectful of grinding poverty that afflicts nearly half of the 80 million Egyptians. Some protesters were looting television sets and electric fans from the burning headquarters.

One protester was killed, bringing the death toll for four days of protest to eight.

“I can’t believe our own police, our own government would keep beating up on us like this,” said Cairo protester Ahmad Salah, 26. “I’ve been here for hours and gassed and keep going forward, and they keep gassing us, and I will keep going forward. This is a cowardly government and it has to fall. We’re going to make sure of it.”

Internet and cell phone services, at least in Cairo, appeared to be largely cut off since overnight in the most extreme measure so far to try to hamper protesters form organizing. However, that did not prevent tens of thousands from flooding the streets, emboldened by the recent uprising in Tunisia – another North African Arab nation.

The sustained and intensifying demonstrations raised serious questions about whether Mubarak could keep his grip on power. Egypt is Washington’s closest Arab ally, but Mubarak may be losing U.S. support. The Obama administration has publicly counseled him to introduce reforms and refrain from using violence against the protesters.

In one of many astonishing scenes today, thousands of anti-government protesters wielding rocks, glass and sticks chased hundreds of riot police away from the main square in downtown Cairo and several of the policemen stripped off their uniforms and badges and joined the demonstrators.

An Associated Press reporter saw the protesters cheering the police who joined them and hoisting them on their shoulders in one of the many dramatic and chaotic scenes across Egypt today.

After chasing the police, thousands of protesters were able to flood into the huge Tahrir Square downtown after being kept out most of the day by a very heavy police presence. Few police could be seen around the square after the confrontation.

The protesters were energized today by the return of Nobel Peace laureate Mohamed ElBaradei, one of the country’s leading pro-democracy advocates. He returned to the country Thursday night after a month abroad, declaring he was prepared to lead the opposition to a regime change.

When he joined protesters today after noon prayers, police fired water cannons at him and his supporters. They used batons to beat some of ElBaradei’s supporters, who surrounded him to protect him.

A soaking wet ElBaradei was trapped inside a mosque while hundreds of riot police laid siege to it, firing tear gas in the streets around so no one could leave. Tear gas canisters set several cars ablaze outside the mosque and several people fainted and suffered burns.

When he returned home police stationed outside told him he was not allowed to leave again.