When Colombian President Belisario Betancur, one of Latin America's most respected democratic leaders, left here after a two-day state visit last weekend, he had unusual praise for his host, the martial-law government of Gen. Oscar Humberto Mejia Victores.

Betancur said Guatemala, a nation with one of the worst human rights records in the region, was setting a positive "example for the rest of Latin America."

Choosing his words carefully, the Colombian leader said that Guatemala's plan to return to civilian rule after its freely elected constituent assembly writes a new constitution was being watched with "interest and hope" in the rest of the region.

That Betancur agreed to visit Guatemala, which has been ruled by the military for 30 years, underlined the extent to which Mejia's 16-month-old government has transformed the nation's image.

Other democratic governments that had denounced Guatemala as one of the most repressive nations in Latin America have begun to embrace it.

President Luis Alberto Monge of Costa Rica, one of Guatemala's most vocal critics, welcomed and praised Mejia warmly when the general visited last week. Monge promised to return the visit in the near future.

Although death squad killings and mysterious disappearances continue, Mejia has promised to hold genuinely free elections after the constitution is completed sometime next year.

Mejia, who came to power in a military coup Aug. 8, 1983, presided over the election of the 88-member constituent assembly July 1. It was Guatemala's first fraud-free vote since the United States orchestrated the overthrow of president Jacobo Arbenz, an elected leader, in 1954.

Those who had expected the current government to be just another military dictatorship are learning to believe Mejia's claim that he has no political ambitions.

"We are doing what we are doing because we believe in it," said Foreign Minister Fernando Andrade, one of the architects of the change, during an interview in his office in the National Palace. "We are proving this with deeds, not empty words."

The main deed, Andrade emphasized, was the move to democratize the country of 7.7 million people in accordance with the principles of the four-nation Contadora group -- made up of Mexico, Venezuela, Colombia and Panama -- which has sought a formula to end the crisis in Central America.

Andrade, once a lawyer for the military officers who are the real political power in Guatemala, spoke zealously about a new awareness in Latin America that history favors a return to democracy over continued military dictatorships.

But more cynical Latin American diplomats believe that Guatemala could no longer ignore world criticism of its military rule and its repression of the opposition with violence as ruthless as that employed by the leftist guerrillas who have fought the government in the countryside for a decade.

Guatemala's past military rulers dealt with their opponents -- both armed and unarmed -- with a scorched-earth policy that left tens of thousands dead in the cities and in the countryside where the guerrillas operated.

Not even the cutoff of U.S. military aid by president Jimmy Carter in 1977 nor shrinking financial assistance from the United States and European nations deterred Guatemala from its brutal policies, and the nation's isolation increased.

But as time has passed, senior Latin American analysts here say, Guatemala has discovered that it could not go it alone and survive.

Guatemala's agricultural economy is a shambles because of the world recession and shrinking prices of coffee, sugar and cotton. Its foreign exchange reserves are exhausted, and foreign creditors resist bailing it out because of its human rights record.

Hardware for Guatemala's tough, 30,000-man armed forces also has dwindled to three helicopters and eight small Israeli troop transports still serviceable in the guerrilla war over this vast mountainous and jungled country.

"Guatemala has finally wised up and realized it can no longer afford to live in isolation," said one senior Latin American diplomat here who requested that his name not be used. "The Mejia Victores government seems at last to have concluded that the nation's future depends on gaining the acceptance of the world community of nations both in America and in Europe."

The immediate payoff for the move toward restoring democracy is the growing diplomatic acceptance of Guatemala, as reflected in Mejia's welcome in Costa Rica and Betancur's visit.

Guatemala's relations with its northern neighbor, Mexico, have improved so much in recent months that U.S. policy makers have begun to worry about Guatemala's increasingly independent position on the Contadora negotiations.

But perhaps the greatest consequence of Andrade's policies is the increasing prospect for foreign economic and military aid to Guatemala's nearly bankrupt economy.

The Reagan administration has set U.S. economic aid for Guatemala at $157.8 million for next year, up about 40 percent over 1984. And, for the first time since 1977, $300,000 in military aid has been allotted for the training of Guatemalan soldiers. However, Congress turned down an additional $10 million in military sales that the administration proposed.

U.S. officials here say openly that Guatemala should be encouraged with more aid to continue democratizing, which they hope will produce presidential elections by 1985.

"The biggest guarantee that we have that Guatemala now is really going to go ahead with its democratization is the fact that if it doesn't, the Army knows the country will go broke in a very short order," said one Latin American ambassador here.