President Jean-Claude Duvalier declared a state of siege in Haiti today to confront increasingly bold political violence that has spread across the island and mushroomed into a growing threat to his second-generation dictatorship.

Duvalier, responding to widespread rumors that he already had fled the country, addressed the nation on government radio this morning, and, using a Creole expression, declared himself "firm as a monkey's tail." When the rumors persisted, he appeared live on national television four hours later to show himself and vow: "I am determined to carry on."

"The forces of order have received the command to enforce strict respect for the constitution, legality and the security of life and possessions throughout the national territory," he declared in explaining the state of siege.

The state of siege suspended civil liberties such as habeas corpus, which, although often violated in practice, were part of the written rules of Duvalier's government. A decree also closed Radio Soleil, the Roman Catholic Church station that has reported recent disturbances in broadcasts in the Creole spoken by most of Haiti's 6 million inhabitants. Radio Lumiere, a similar station run by the Baptist Church, and the privately owned Radio Cacique also were closed.

Reporters said they heard some shots fired during disturbances in the capital, and hospital authorities said that several persons were killed and about 50 injured. Motorists driving here from the northern city of Cap-Haitien said crowds were marauding in the countryside, apparently out of control, while police stood by.

Despite Duvalier's demonstration of resolve, diplomats, political opposition leaders and ordinary Haitians expressed a growing expectation that the 34-year-old dictator was likely to be forced out soon by the street troubles. His departure would end a family dictatorship established 29 years ago by his father, Francois (Papa Doc) Duvalier, and raised the risk of instability in a nation with a history of bloody conflict since its independence from France in 1804.

Reflecting these sentiments, two of the president's most prominent political opponents, Gregoire Eugene and Hubert de Ronceray, said openly that intervention by the 7,500-man armed forces has become the only solution to the crisis.

"A coup is one of the necessities of the moment," de Ronceray said in an interview.

"The question is no longer if," said a well-informed diplomat speaking about the possibility of Duvalier's downfall. "The question now is when and how."

There was no public indication of attitudes within the military, which has been split into a half dozen separate commands reporting directly to the president. But soldiers in khaki battle dress carrying M14 rifles established a no-trespassing perimeter around the eggshell white presidential palace in Port-au-Prince. Blue-uniformed Volunteers for National Security, popularly known as Ton-Tons Macoutes, gathered at adjacent barracks to defend the president.

Government television reported that Duvalier addressed the nation from inside the gleaming palace. He was shown in a tan safari suit surrounded by youths in civilian clothes with Israeli-made Uzi submachine guns slung from their shoulders.

Gangs of young men roamed nearby along shuttered streets in the capital's commercial center. Armed police cordoned off some of the main arteries and prevented crowds from gathering, by and large enforcing an expectant calm downtown.

But youths hurled rocks at cars and shops, and set fire to tires in a few areas. On one downtown street, the Rue des Miracles, a half dozen shops and offices were pillaged, and one was gutted by fire.

More than 1 million Haitians live in the capital, many in a misery that has made this country the poorest in the hemisphere. Haitians and diplomats alike expressed fear that street violence here, if it exploded out of control, could become significantly more chaotic than the unrest that has plagued several provincial cities off and on since late November.

The U.S. Embassy announced that Americans have been advised against coming to Haiti, and the approximately 5,000 U.S. citizens on the island were advised to stay indoors. Earlier State Department advisories had discouraged travel through the cities of Cap-Haitien, Gonaives and Les Cayes, hit by previous disturbances.

President Salvador Jorge Blanco of the Dominican Republic, which shares the island of Hispaniola with Haiti, said he had closed the border and assigned more soldiers to the frontier, The Associated Press reported.

"The events of recent days in Haiti have required us to take every measure to suspend all traffic between Haiti and the Dominican Republic," Blanco said at a news conference.

The boldness of street crowds, which according to telephone reports was apparent again today in a number of the provincial cities, dramatized growing willingness to challenge the Duvalier government that for years has maintained its rule with an iron hand. At least six persons had been killed before today in street disturbances since the weekend; three were shot by authorities, and three were trampled by demonstrating mobs in Cap-Haitien.

"The people are not afraid anymore," said the Rev. Arris d'Estaing, youth chaplain for the Les Cayes Roman Catholic diocese. "In my judgment, the process is irreversible. Ask me how long it will take, I don't know. Ask me how it will happen, I don't know. But it is a process that will not be stopped."

The expectation of Duvalier's downfall was so widespread here that rumors of his departure during the night were broadly believed. De Ronceray said a friend called him from Paris to report -- falsely, it turned out -- that Duvalier already had arrived in France.

Some reports this morning included names of Haitians who supposedly were to form a transitional government and prepare for elections. Eugene and de Ronceray both said that a U.S. Embassy political officer called them during the morning to ask whether Duvalier was gone, and to check rumors that they were in the putative cabinet.

Eugene and de Ronceray both expressed distaste at the idea of a military takeover but said it appeared to be the only way to prevent bloodshed and establish a provisional authority if Duvalier falls. The military and the Catholic Church are the only organized institutions, other than the government, in the country, they explained.

"After such a government, all these years, you must have a force to maintain order and prepare the way for democracy," Eugene said in an interview. "The armed forces are the only thing left."

Duvalier, prodded by the United States and other aid donors, has spoken increasingly of "democratization" since he took over following his father's death in 1971. Although insisting that he is "president for life," he has curbed some of the most extreme human rights violations practiced by his father and has opened the way for tightly circumscribed political activity.

His tough reaction to the current unrest, however, seemed to endanger any further development in that direction. Similarly, it seemed to throw further doubt on the possibility of human rights certification by the U.S. State Department, a congressional condition for approving U.S. aid here. The U.S. administration had asked for $56 million for the 1986 fiscal year.