CUCUTA, COLOMBIA -- Notched into the northern corner of the Andes Mountains, this border city forms a natural gateway for drug smugglers and Marxist guerrillas moving from the lawless, impoverished backlands of Colombia into more affluent Venezuela next door.

The dramatic increase in cocaine trafficking, marijuana farming, kidnaping and armed attacks on military posts along the frontier has raised fears that Colombia and Venezuela are losing control of the 1,000-mile-long zone.

The boundary stretches from the Caribbean Sea through the rugged Sierra de Perija Mountains inland to oil-rich plains. In the Sierra de Perija, 150 miles north of here, gunmen believed to be Colombians killed nine Venezuelan national guardsmen on an antidrug patrol on June 12, drawing Venezuela's attention to the dangers at hand.

Under pressure from opposition party leaders over the incident, Venezuelan President Jaime Lusinchi replaced the entire general staff of the armed forces, and the Congress in Caracas opened an investigation.

Venezuelan politicians have charged that Colombia's Army is turning a blind eye to the upsurge in border turmoil, but Alvaro Suarez Lagos, secretary of the Colombian department of North Santander, denied the charge.

Suarez said North Santander had been immune to Colombia's endemic violence until Occidental Petroleum Co. began developing the billion-barrel Cano Limon oil basin in the neighboring department of Arauca two years ago. "Now every subversive group has a front here," said Suarez.

According to Suarez and other Colombian officials, the guerrillas were lured here by the possibility of blackmailing contractors building a 500-mile, $500 million pipeline running from Cano Limon through North Santander to the Caribbean coast.

Colombian Army officers have accused the West German pipeline construction company Mannesman of paying off the guerrillas, and published reports claim the leftist National Liberation Army, known by its Spanish initials ELN, raised as much as $50 million through extortion. Mannesman has denied the charges.

The Cuban-line ELN -- whose most famous member was a priest-revolutionary, Camilo Torres, slain in 1966 -- was divided by internal disputes until two years ago. But it is now united, well-armed and second only to the extreme nationalist M-19 as the most pugnacious of Colombia's 10 guerrilla organizations. The ELN is said to have about 2,500 armed members.

If the guerrillas have profited from the pipeline, they also have exploited its political potential by denouncing the project as a sell-out to foreign interests. To make their point, guerrilla commandos have blown up pumping and pipeline installations at least 20 times.

The Colombian guerrilla group has also attacked in Venezuela. Since 1983, the ELN has taken credit for a series of assaults on Venezuelan National Guard posts just north and south of Cucuta, killing at least seven guardsmen and escaping with a quantity of light arms.

Although Lusinchi visited one besieged frontier post last year, the Venezuelan government has been unable to halt armed incursions into this remote, underpopulated region.

Central governments in both Bogota and Caracas and have done little to develop the area. Suarez said Colombia's national leaders have sowed the seeds for rural insurrection by neglecting the needs of the poor peasantry in heavily agricultural North Santander.

The per capita income for Colombia's peasants is only a third of the national average. Colombian President Virgilio Barco, who took office last year, has pledged major rural investments. But critics, including the guerrillas, charge that the source of the problem is Colombia's skewed land ownership. A government survey several years ago estimated 3 percent of the nation's landowners hold 55 percent of the land.

Rancher Marco Carvajalino Garcia, president of the Cattlemen's Association of North Santander, agrees that Bogota must do more for the backlands, but his immediate concern is the increase in attacks on isolated ranch owners in the region, where 22 cattlemen have been kidnaped in the past two years.

Across the border, according to the Venezuelan National Cattlemen's Federation, nine ranchers have been kidnaped, and others have asked the government for permission to carry weapons.

Some Venezuelan kidnap victims say they were taken into Colombia by the ELN, and both Colombian and Venezuela military officials blame the ELN for the killings of the Venezuelan National Guardsmen in the Sierra de Perija.

Officials say the guerrillas provide protection services for marijuana and coca cultivators who have moved into the remote Venezuelan mountains to escape drug-eradication programs in Colombia, but the charge has not been proven.

What is known is that large amounts of cocaine are now moving through Cucuta into Venezuela and on to drug consumers in the United States and Europe. The Venezuelan National Guard at the regional headquarters in San Cristobal, across the border from Cucuta, claims to have confiscated 1,320 pounds in a nine-month period ending in June.

Gen. Carlos Sanchez Delgado, who heads the San Cristobal post, said in an interview that the drugs are moving in small quantities difficult to detect. He said a 78-year-old woman was caught with 4.5 pounds, or 2 kilograms, of cocaine in her underwear in April, and another, grisly story holds that a Colombian mother tried to smuggle cocaine in the body of her dead baby.

Drug trafficking pays well. According to National Guard sources, 2.2 pounds of cocaine costs $4,000 in Cucuta, but the price jumps instantly to $6,500 when carried across the Tachira River to San Antonio, Venezuela.

The vast amounts of money involved in drug smuggling have prompted critics to question the wisdom of keeping the same National Guardsmen permanently stationed on border duty instead of rotating them frequently to reduce the potential for corruption.

Sanchez denied that the large volume of drug trafficking indicated that Venezuelan National Guardsmen might be accepting bribes from the smugglers.

According to narcotics police in Caracas, the drug traffickers are also taking advantage of clandestine trade routes set up to smuggle food products and household items out of Venezuela.

On a typical day during the first half of this year, some 158 cases of powdered milk, 992 cases of cooking oil and 926 cases of eggs moved from the Venezuela to Colombia, according to the Venezuelan customs office in San Cristobal.

Reports published before the Sierra de Perija shoot-out said presidents Lusinchi and Barco would meet later this year in Cucuta to discuss a lingering boundary disagreement. That meeting is now likely to focus on ways to assert central government control over the increasingly lawless border region.