The Tunisia government declared a state of emergency yesterday after a general strike erupted into bloody riots, the first serious challenge to President Habib Bourguiba in his 22 years of rule.

Several persons were reported killed and a number of others injured as the government used tanks against demonstrators here, and imposed a ports said at least ten persons died in dusk-to-dawn curfew. Unofficial [TEXT OMITTED FROM SOURCE] the riots.

Violent demonstrations also were reported in Sousse, Gabes, Kasserine and the Muslim holy city of Kairouan. But the second-largest Tunisian city, Sfax, was reported calm.

The clashes appeared to be a show of political force by the General Union of Tunisian Workers and its leader, Habib Achour. The union, Tunisia's largest, has sponsored anti-government agitation since last fall in a broad campaign that began to protest a wage hold-down and expanded into a challenge to the government.

Soldiers and police took over the streets of Tunis. The government radio broadcast appeals for blood donations for the injured. Even before the curfew the radio extorted the city's residents to remain indoors.

Gunfire was still cracking in some neighborhoods as darkness fell but security forces appeared to have regained control of most of the city.

Authorities gave no casualty estimate. Reporters in Tunis saw one body being carried away and injured demonstrators running from police.

The soldiers and police officers were pelted with bricks, stones and sticks by the angry mobs, which sacked a number of shops and stores and burned an office of the ruling Neo-Destour party.

The disorders grew from a 24-hour general strike to protest the economic policies of Premier Hedi Nouira and, by extension, against Bourguiba himself.

The president, 73, who suffers from a form of arteriosclerosis, led this North African nation of six million inhabitants to independence from France in 1956. Called the "Supreme Combatant," he ran the country with his Neo-Destour party without serious challenge until his illness recently forced him to reduce his activities.

His withdrawal posed a problem of succession. Nouira, the successor picked by Bourguiba, does not have the political stature or popular following of his patron.

The firing a month ago of Interior Minister Tahar Belkhoja, a veeteran regarded as a moderate was interpreted as a sign of high-level dissent within the government and suggested that Bourguiba had decided to crack down on the strikers.

Belkhoja was replaced temporarily by Defense Minister Abdallah Farhat, who has frequently called for tougher action against the antigovernment protesters. Later Dhaoui Hanablia, a newcomer to the government, was named interior minister.