Set against an expanse of smashed hovels and heaps of mud, President Hugo Chavez seemed more like a reassuring soldier than a head of state as he stood on a mountain ridge in camouflage fatigues and a paratrooper's red beret, stroking the head of a young boy while trying to comfort his distraught parents.

Like tens of thousands of others in the northern coastal state of Vargas, they had been left homeless by last week's devastating flooding and mudslides. Using a trademark blend of levity and authority, Chavez told the family of his plans to relocate people from storm-ravaged areas to other parts of the country and build them new homes.

"We are in the middle of the battle; we will survive this," Chavez told a crush of reporters after his weekend visit to Vargas. "We have plans to create great cities in the south and the interior."

Chavez, 45, a former paratrooper, has tirelessly traversed flood-swept areas, surveying destruction and comforting survivors, since drenching rains last week unleashed raging river torrents and crushing flows of mud and rock that killed thousands of people in one of the greatest natural disasters to hit Venezuela.

The scale of the damage--nine states have been declared disaster areas--and the monumental task of rebuilding have radically redefined the role and priorities of Chavez's 11-month-old populist presidency and left hanging in the balance many of the economic and social plans of the "peaceful revolution" that catapulted him into office.

The devastation, most of it along Venezuela's northern Caribbean coast, is already accelerating Chavez's previous promises to move people from the north, where more than 70 percent of the nation's 23 million people live, to sparsely inhabited stretches of the country and to give the military a greater role in society.

Chavez, a cashiered army lieutenant colonel who led a failed coup in 1992, was elected last year on a wave of growing discontent among the country's vast underclass after more than four decades of government corruption and mismanagement. He pledged to overhaul the oil-rich but poverty-stricken nation and usher in a new era of social justice, a program that was boosted last week when voters overwhelmingly endorsed a new constitution giving Chavez sweeping powers.

As the country grapples with the enormity of the storm damage, Chavez has tapped into his popularity and used his high-voltage oratory to call for national unity. He also has cast himself at the center of the disaster relief effort. Over the weekend, he took personal command of 1,500 paratroops who were being lowered from helicopters to deliver supplies to people awaiting rescue in isolated areas.

Chavez has opened the doors to his presidential residence in Caracas to children displaced by the catastrophe, and at night he has made lengthy televised addresses to the nation, detailing relief operations and urging his countrymen to persevere.

A controversial and enigmatic figure who has irked the United States by forming a close relationship with Cuban President Fidel Castro, Chavez has used Castro's folksy style in recounting anecdotes of common people struggling to survive. "The fisherman, the farmer, the rancher, the store owner--they are all working to rebuild the Venezuelan family," Chavez said last week as the scale of the disaster became clear. "This is a moment of union; it is a moment of solidarity."

According to government estimates, between 5,000 and 30,000 people were killed and 140,000 left homeless in flash flooding and mudslides of Dec. 15 and 16.

As part of his response to the disaster, Chavez has ordered that more than a half-dozen military bases be converted into short-term housing for the homeless while the government uses state land, as well as property donated by individuals, to construct dwellings that will become new communities for the displaced.

Even before the storm, Chavez had been eager to relocate part of the northern region's population, made up mostly of poor people who lived in shantytowns surrounding major cities and along the coast. The president has contended that residents of the newly inhabited areas could become farmers.

Chavez also has moved quickly to implement his plan to give the armed forces a greater role in public affairs. More than 12,000 troops are involved in air and sea rescue operations that have brought more than 110,000 people to safety, while thousands of other soldiers have been deployed along the coast to maintain order and crack down on looting. With reconstruction expected to take years, a strong military presence is expected to remain in place for some time, with large segments of the armed forces deployed to help in the rebuilding.

But the cost of reconstruction is expected to run into the billions of dollars at a time when the country is mired in its deepest recession on record and faces $3.6 billion in payments next year on its foreign debt, which the government likely will attempt to postpone.

"How is the government going to finance this [rebuilding]? I think Chavez will have to go to international markets to raise the capital and seek multinational financing . . . from such institutions as the World Bank," said Ricardo Penfold, chief economist at Santander Investment in Caracas. But Penfold noted that a downgrading of Venezuela's credit rating this week by Standard & Poors would make it more expensive for Venezuela to raise new capital.

The president also faces the challenge of unifying the various political and social interests in the country following a highly divisive debate over the new constitution. On several occasions, Chavez has used his national broadcasts to take swipes at his predecessors for allowing vast numbers of illegally built shanties to sprout on mountainsides in Caracas and along the coast. Many of the hovels, constructed by rural people who migrated to metropolitan areas several decades ago, were obliterated in the disaster.

Chavez also criticized past governments for allowing luxury apartment buildings to be erected in areas that are legally off limits to construction, in part because they are highly vulnerable to mudslides and flash floods. Rubbing his fingers together, Chavez uttered the word "corruption."

Chavez has called on the wealthy to "adopt a family for Christmas," following his example of opening La Casona, the president's residence, to children orphaned by the disaster.

Some political analysts warn that by seeking to settle old scores, Chavez runs the risk of alienating opposition parties and the business community.

"If the president understands that it is time to bury the hatchet and time for the full, wholesale reconstruction of the country, he will be successful at what he does," said Eric Ekvall, a political consultant. "The new Venezuela will be one where rebuilding life and rebuilding the nation is more important than who did what to whom over the last 40 years."

CAPTION: President Chavez jokes with two young flood survivors who were being housed at an army barracks outside Caracas.

CAPTION: A line of caskets containing the bodies of flood victims awaits interment at a Caracas cemetery.

CAPTION: Survivors of flash floods that devastated the town of La Guaira leave the area on a tractor.

CAPTION: One resident of the town of Macuto tries to help another through drying mud on the main street.

CAPTION: A survivor of torrential flooding in Macuto cradles his pet dog in his arms as he makes his way to safety.