Tunisian President Zine al-Abidine Ben Ali imposed a state of emergency across the country and a nighttime curfew on Friday, state television reported, amid the worst civil unrest of his 23-year rule. "Following acts of violence, it has been decided to introduce a state of emergency in the country to protect Tunisian citizens," state television said.

"The president has given orders to Prime Minister Mohamed Ghannouchi to create a new government," said the state television broadcast. The TAP news agency reported the president plans to call early legislative elections in six months.

"This state of emergency means that any gathering of more than three people is forbidden, that arms will be used by security forces in cases where a suspect does not stop when asked to do so by the police and thirdly, a curfew (is imposed) from 5:00 this evening until 7:00 in the morning for an indefinite period," state television said.

Tunisian military units on surrounded the international airport on the outskirts of the capital city, an airport official told Reuters by telephone. "There army is surrounding the whole airport right now," said the official, who did not want to be identified.

Friday's announcement and military movements come as Tunisian police fired rounds of tear gas at thousands of demonstrators protesting against high food prices and unemployment in the capital, Tunis. Plainclothes policemen were seen kicking unarmed protesters and beating them with batons.

Some demonstrators climbed atop the roof of the Interior Ministry, where over the years there have been reports of torture. The march was organized by Tunisia's only legal trade union, which also went ahead with a symbolic two-hour strike.

The demonstrators were marching through Tunis to demand the resignation of the country's autocratic leader. Many shouted 'Ben Ali, out!' and 'Ben Ali, assassin!' Another poster read 'We won't forget,' a reference to the rioters killed, many by police bullets. Crowds sang the national anthem, fists in the air.

"We want to end this dictatorship," said Wadia Amar, a university chemistry professor. "The Ben Ali clan should be brought to justice. They've taken everything." Ben Ali said on Thursday he would leave office at the end of his term in 2014 amid the worst civil unrest of his 23-year rule.

"A month ago, we didn't believe this uprising was possible," said Beya Mannai, a geology professor at the University of Tunis. "But the people rose up." Pent-up anger at high unemployment and at a leadership many see as controlling and corrupt has exploded into riots in the past few weeks.

Ben Ali, 74, has maintained an iron grip on Tunisia since grabbing power in a bloodless coup, repressing any challenges. He has locked up many opposition figures, clamped down on dissent and kept tight control over the media but has not been able to resolve the country's rising unemployment, officially at nearly 14 percent, but higher for educated youths.

The riots began after an educated but jobless 26-year-old committed suicide when police confiscated the fruits and vegetables he was selling without a permit. The official death toll in the riots is 23, but opposition leaders put the figure at three times that, and medical workers on Friday reported another 13 new deaths and over 50 injuries from late Thursday alone.

U.S. diplomatic cables released by WikiLeaks have described the corruption in Tunisia, and social networks like Facebook have helped spread the comments.

After President Ben Ali spoke on television Thursday, promising to leave the presidency when his term ends in 2014 and ordering prices on basic food staples to be slashed, thousands filled the main tree-lined Avenue Bourguiba, cheering 'Long live Ben Ali!' honking horns and waving flags.

Many people demonstrating Friday claimed the pro-Ben Ali rally on Thursday - which broke a government-imposed curfew - was staged by the powerful ruling RCD party, which paid jobless youths to participate. They claimed many of the cars that cruised the avenue, some with passengers standing on the car roofs, bore the blue license plates of rented vehicles.

"That was all prepared in advance," said Haitem Ouerghemi, 30, a call center worker. "It was a Hollywood scene."