In a foreboding letter to the U.S. Embassy here five years ago, Max Dalton detailed the intimidation he had suffered at the hands of armed squatters bent on occupying his ranch in the remote southern region of Pavones.

Dalton, an Idaho cattle breeder, had been the target of two machete attacks and a pair of bombings at his house in which coconuts filled with gun powder were used. His horses had been stolen and his boat torched.

"Daily, I am living in danger of my life," he wrote in the three-page letter. "There is no law' here and requests for assistance and protection are completely nonproductive or ignored."

Last November, Dalton, 78, and squatter Alvaro Aguilar, 55, killed each other, according to authorities, in a shoot-out on Dalton's land after squatters again had invaded the American's ranch and threatened to murder him. In the days before his death, Dalton and his children in the United States had once more alerted the U.S. Embassy in San Jose, which in turn contacted Costa Rican officials about their predicament.

"We passed on to the authorities that he feared for his life and they said they would look into it, yet no protection was provided," embassy spokesman David R. Gilmour said. He added: "At least some Costa Rican officials have tried to categorize this as an isolated incident. But we hear from Americans all over the country that they have been threatened by armed squatters."

In Costa Rica, one of the few Latin American nations that has allowed the widespread buying of land by foreigners, squatters have been usurping private property and waging campaigns of harassment and violence aimed at anyone who challenges them.

Foreign landowners have returned from extended trips abroad unable to enter their properties because they are occupied by squatters, and cattle belonging to ranchers or speculators. The cattle owners have been accused of organizing peasants to undertake what are known here as "invasions," to acquire valuable land.

A number of property owners say they would like to sell their real estate holdings but that the squatter problem has made it impossible to find buyers.

The problem is in part tied to Costa Rica's land laws and the varying interpretations of them, which grant significant rights to squatters and in effect do not recognize private property as inviolable. Generally, squatters who stay on a piece of land more than three months begin to garner rights to that property, and court action is needed to remove them. After a year, it becomes extremely tough to evict them, and in 10 years they can register the plot as their own.

The situation -- which affects Costa Rican as well as foreign landowners -- has been complicated further by difficulties and confusion that can arise in trying to obtain clear title to land in Costa Rica, as well as appeal processes that can tie up landowner complaints in the court system for months. Government corruption and inaction add to the problem.

The United States has not ruled out the possibility of imposing economic sanctions against Costa Rica if it does not move to resolve the problem of land disputes in Pavones and investigate the attack on Dalton to U.S. satisfaction.

While many landowners say they never have encountered squatters, the extent of the problem appears to be considerable. Landowners have been shot at and stoned by intruders, and homes, including squatters' shacks, have been burned.

At Cocotales, Costa Rica's largest coconut plantation, near Guapiles, in the northeast, about 100 squatters moved onto the 1,300-acre property two years ago even though 60 Americans, Canadians and Britons claim to hold titles to the property.

Suzanne Pierot, who manages the plantation, and her administrator have received death and kidnapping threats, and more than 1,000 coconut trees have been chopped down illegally.

After spending about $50,000 in legal fees, Pierot got a large number of the squatters evicted, but many remain. "Once they invade the property and take it over, they act like it is theirs," said Pierot, who holds a British passport and owns seven coconut groves on the plantation.

Foreign and Costa Rican landowners recently formed the Association for the Defense of Private Property, a 350-member group that has been petitioning the government for greater landholder rights.

Some observers contended that while there are organized groups of squatters led by well-off opportunists whose intent is to grab land from legitimate investors, many of the rural poor have no choice but to seek homes on private property. "A lot of Costa Rica is being sold, and for the campesinos, their way of life has been shattered," said Ignacio Dobles, a psychologist at the University of Costa Rica who has worked on a number of projects in Pavones, near the border with Panama. "You have a lot of idle land that is private and people who have to live. That creates the conflict."

U.S. officials have become increasingly critical of the way the squatter problem has been addressed by Costa Rica, where an estimated 30,000 Americans, many of them retired, live. The U.S. officials say the country's leaders encourage foreign investment by promoting the nation's natural beauty and history of political and social stability, but have done little to protect landowners from poachers.

The U.S. Embassy has expressed misgivings about the investigation into last year's shoot-out on Dalton's property. Costa Rican authorities acknowledged that the crime scene was not secured until Organization of Judicial Investigation officials arrived more than 90 minutes after the gunfight and that it was possible other squatters present during the incident tampered with evidence. Authorities said circumstances of the shooting remain unclear and it is impossible to determine whether the group set out to kill Dalton. No arrests are expected, they said. In an interview, Vice President Rodrigo Oreamuno, named to head a commission to remedy the land problems in Pavones, said Costa Rica is being treated "unfairly" by the United States. He contended that U.S. officials are going too far in telling the government how to deal with the Dalton case and the squatter problem, and in pushing for reforms of land-tenure laws. "The problem exists, there are conflicts. We have hoped that they did not exist, but we are trying to cope with them," he said of the land disputes. But, he added, "we are respectful to the sovereignty of other countries and we expect that is the attitude the United States should have in relation to Costa Rica." CAPTION: U.S. cattleman Max Dalton, 78, a landowner in Costa Rica, had asked authorities for help after squatter attacks but he was killed last fall in a shootout that also left a squatter dead. CAPTION: Squatters Jose Sabarq, 78, and his wife Anna Oria, 60, said they farm unused land at Cocotales plantation. "We are campesinos and like to farm," Sabarq said. "The air is rich and this is our life. It is the land of Costa Rica." CAPTION: Suzanne Pierot, manager of Cocotales Plantation near Guapiles, has had many squatters evicted and says she has received death threats.