VINH LONG, VIETNAM -- Only two years after its Communist rulers made an international appeal for emergency food aid to avert a famine, Vietnam has transformed its agricultural system, boosting productivity and catapulting itself into the unlikely position of the world's third largest rice exporter in 1989.

Most of the increased production has come here in the country's agricultural heartland, the fertile Mekong Delta in what was formerly South Vietnam, an area that saw some of the most intense fighting between U.S. soldiers and Viet Cong guerrillas during America's decade-long military involvement in Indochina. Operating under new rules from Hanoi that give provinces a freer hand to sell their products abroad, the Mekong Delta region accounted for more than 90 percent of Vietnam's rice exports last year.

Vietnam's dramatic turnaround in rice production is by far the most concrete and visible success in a three-year economic reform program that has shown only modest results in other key sectors.

Vietnam exported 1.4 million metric tons of rice last year, behind only the United States and Thailand. The trend has continued this year, with Vietnam exporting between 200,000 and 300,000 tons of rice in the first three months of 1990, according to agricultural officials.

Here in coastal Cuu Long Province, a Viet Cong stronghold during the war, farmers produced a record 1 million tons of rice last year, and agricultural officials are hoping for 1.2 million tons in 1990. The province produced so much rice last year that officials are still having trouble processing it in their antiquated mills and finding markets for it abroad. A local official said farmers are storing rice in their houses until the government can find buyers, and much of it may end up being fed to pigs.

Nguyen Va Ba, the provincial official in charge of agriculture here, attributed the increase to improvements in the province's aging irrigation system that allowed farmers to make use of idle lands and plant two rice crops each year instead of one. He said the central government's economic reforms -- for example, giving farmers lifetime tenancy on their land -- were "like a key that opened the door to greater production."

While farmers complain that the government still pays them too little for their rice, many here in the Delta have been able to improve their lifestyles significantly, using their new earnings to invest in consumer goods and to upgrade their farming equipment.

Here in Cuu Long, a 51-year-old farmer named Thach Manh proudly showed a visiting reporter the stereo and television set he recently purchased for his two-room thatched-roof hut. "All the houses around here have stereos -- but I'm the only one with a television," he said. "If we can earn it, why shouldn't we entertain ourselves?"

Although most of the increase has occurred here in the Mekong Delta, even the northern half of the country has produced more rice. The increased production has allowed the central government to build up its badly depleted rice reserves -- although the numbers are still considered a state secret. With new reserves, Hanoi has been willing to allow the more prosperous provinces in the south to export rice that previously had been needed to avert famine.

It is the north, with its harsh typhoon weather, that traditionally has run short of rice between harvests, forcing the government to ship in large amounts from the more fertile south. In 1988, it was in the northern coastal provinces of Thanh Hoa and Nghe Tinh that the government said peasants were facing widespread famine and had to eat their seed stocks to stay alive.

While the south owes its increased production primarily to technical improvements -- like the new canals in Cuu Long, for example -- the north's gains are almost all directly traceable to Hanoi's economic reforms and the loosening of the Communist grip over agricultural life. Unlike the formerly capitalist south, the northern provinces went through a lengthy period of collectivization and cooperative agriculture that the party has only recently scrapped in favor of free-market principles.

The most important change, according to Vietnamese agriculture officials and foreign experts, was the decision to abolish costly state subsidies that kept the price of rice artificially low and created a two-tier system of state and market prices. Because city dwellers and government employees were given rations to buy certain amounts of rice at the cheaper, state-supported price, they tended to buy rice and hoard it when they didn't need it.

Under the new system, the state subsidies were eliminated, salaries were increased and people were told to buy their rice at markets. Economists and agricultural officials said that because of this change, people are now buying only the rice they need.

While the changes generally have been applauded, the new free market in agriculture has brought some severe dislocations in the poorest northern rural provinces.

"There is no famine, no starvation in Vietnam anymore, but there are still people who don't have enough to eat," said Nguyen Van Phuoc, director of the Agriculture Ministry's international affairs department in Hanoi. "In previous years there was a shortage of rice and we had to buy it from other countries. Now we have no more shortages, but still people have no money . . . . Poverty is still a social problem we have to solve."

The shift away from state control of agriculture has introduced new and growing disparities in income among farmers, creating the concept of economic classes among the rural peasantry for the first time in the north since the Communists came to power.

At the Hung Tien agricultural cooperative in Nghe Tinh Province, a 50-year-old farmer named Tran Dinh Soa produced and sold enough rice last year to buy a new bicycle, some electric fans for his house and a new flour mill.

Just down the dusty road, however, Tran The Ky lost nearly half of his last rice harvest to a typhoon that also destroyed one wall of his thatch hut. "We ran out of rice a long time ago and we don't have money to buy any at the market," he said through a translator. "We have to borrow rice from the cooperative or from relatives."

Officials in Nghe Tinh's capital said the growing income gaps between farmers are only one of the social costs of the new economic policies. "There are some households with a lot of rice, and some with none," said Nguyen Van Thua, the province's deputy director of agriculture. He said the reforms "allowed some people to get rich. And we encourage them to get rich. But we can't close our eyes to those who don't have enough."

Thua estimated that 25 percent of Nghe Tinh's farmers have become comparatively wealthy because of the economic reforms, while 30 percent -- about 1 million people -- do not have enough to eat.

Such income gaps are reflected starkly in the contrast between the country's two formerly warring halves. While the north is still grappling with the problem of how to feed itself, the south -- under the capitalist rules it was accustomed to as the former South Vietnam -- is busy looking for new markets for its rice, and new techniques to improve its quality and variety to suit more upscale international tastes.

"Our problem now is how to improve the quality of our export rice," said Vo Van Hien, a Foreign Ministry economic consultant in Ho Chi Minh City, formerly Saigon. "We don't dare compare our rice to American rice, but we want to make sure it is no worse than Thai rice."

Most of Vietnam's exports last year went through French traders to African countries such as Ivory Coast and Madagascar, which are not particular about the quality of their rice. But officials said Thailand is concerned that Vietnam may become a competitor for its traditional customers, India and Sri Lanka.

Vietnamese officials also talk ambitiously of exporting to Europe, but experts see that as problematic. "If they want to go to the European markets, like France or Eastern Europe, then they need a better quality," said an official with the U.N. Food and Agriculture Organization based in Hanoi. "Up to now, the number one priority was to feed the people, so there was not much concern about the variety."