DAKAR, Senegal — For months, they met in hotel rooms and at an army base in Guinea-Bissau, plotting the exchange of thousands of pounds of cocaine and an arsenal of weapons between South America and West Africa.

The plans involved high-ranking Guinea-Bissau military officers, present and former; drug traffickers; would-be Colombian guerrillas; and, in the background, government officials of the tiny coastal country, a haven for narcotics smuggling.

The stakes were high. Millions in cash, guns and drugs were on the table, and a swaggering figure around town, the former chief of the Guinea-Bissau Navy, Rear Adm. José Américo Bubo Na Tchuto, was determined to claim his share: a cool $1 million for each 1,000 kilos of cocaine brought in under his front company. He would then store it in an underground bunker.

Mr. Na Tchuto did not know it, but some in the sweaty negotiations were Drug Enforcement Administration operatives. The trap had been set, and on Monday, the former admiral found himself in a Manhattan courtroom facing federal drug trafficking charges, the culmination of elaborate American stings two weeks ago.