GUATEMALA CITY--Signaling a link between drug trafficking and the arms deals of Colombian death squads, a court in Managua on Thursday convicted a former Nicaraguan policeman turned arms dealer of possession of narcotics and illegal weapons.

Colombian authorities have long accused the right-wing "self- defense forces" that fight the country's Marxist guerrillas of ties to narcotics barons who supply three-fourths of the cocaine and a growing share of the heroin consumed in the United States.

The conviction of Roger Ramirez--a former Nicaraguan police official drummed out of the force six years ago under a cloud of suspicion involving drug trafficking--illustrated those ties in a court of law.

The self-defense forces were formed a decade ago by ranchers and rural merchants besieged by rebel kidnappings and extortion. Heavily subsidized by drug traffickers in recent years, the private armies have become a major factor in Colombia's prolonged civil war as they regain territory from the insurgents, mainly by terrorizing civilians that they suspect of being rebel sympathizers.

Increasingly, Colombian intelligence officials believe that disputes between the self-defense forces and the insurgents are centered on areas that produce cocaine and heroin. Both sides are believed to "tax" production of illegal crops.

Leaders of the self-defense forces have acknowledged human rights abuses but insistently denied any ties to drug traffickers. They could not be reached for comment on the puzzling case of Ramirez, who in court in Managua, the Nicaraguan capital, called himself a leftist and then announced his intention to join Colombia's anti- guerrilla forces.

Police were tipped to his arms cache last month when they saw suspicious Guatemalan and Colombian figures visiting the ranch belonging to Ramirez's father, according to court documents.

Officers discovered the illegal arms, including rocket launchers, at the ranch, then searched the Managua home of Ramirez's ex-wife, finding 275 pounds of cocaine, the documents stated.

"The arms are mine," Ramirez told the judge last week. "I sold them for a nominal price to the commanders of Colombia's self- defense forces, and I had planned to join their struggle."

But he denied any knowledge of the cocaine.

The court found Ramirez guilty of possession of both the arms and the drugs. A jury will determine the length of his sentence, which could range from two to seven years.

Ramirez testified that he had obtained the weapons in 1990, during the transition from the Marxist Sandinista government that ruled Nicaragua in the 1980s to the elected administration of Violeta Barrios de Chamorro. At the time, he was the Sandinista Interior Ministry delegate in the eastern port city of Bluefields--now the hub of Nicaragua's drug trade.

In open court, Ramirez would say only that the purpose of the weapons was "practically a state secret."

Tomas Borge, who was interior minister during that period, denied that he had ordered Ramirez to deal in arms. "To think that the government was sending weapons to South America is ridiculous," he testified. "We were receiving support from other governments. Selling arms was prohibited."

After leaving the police in 1993, Ramirez opened a law practice and successfully defended several drug trafficking suspects. He was prosperous enough to send his children to Managua's most exclusive private school.

Ramirez testified that he decided to sell the weapons to the Colombian self-defense forces because "their current struggle is similar to that of other military forces in the past decade that struggled against a dictatorial government."