A federal appeals court here yesterday delivered a severe setback to the "gray market," in which foreign perfumes, cameras, electronic products and other goods are sold at a discount in this country.

The three-judge panel of the U.S. Circuit Court of Appeals for the District of Columbia ruled that the Customs Service should not allow the importation of goods bearing a foreign trademark if an American company owning the U.S.-registered trademark objects. It declared that the Customs regulations were contrary to the Tariff Act of 1930 and therefore unlawful. The court held that Customs has to bar such goods under federal law. But it refused to require Customs to ban the merchandise immediately.

The gray market developed as a result of the increase in the dollar's value against other currencies. That made it easy for independent importers to purchase goods abroad, bypassing the foreign manufacturers' authorized representatives in this country. The importers then could sell Nikon cameras, Waterford crystal, Seiko watches and other brand-name products at discounts of as much as 40 percent below the suggested retail prices set by the authorized representatives.

Yesterday's ruling does not cover an important segment of the gray market. Because the American subsidiaries of foreign automobile manufacturers are licensed trademark users rather than trademark owners, luxury European cars would not be covered, said Joseph Innamorati, corporate attorney for Mercedes Benz N.A.

"We are very, very pleased," said David Mosteller, senior vice president and general counsel for Charles of the Ritz, a fragrance company with headquarters in New York.

Mosteller is a member of the Coalition to Preserve the Integrity of American Trademarks (COPIAT), which brought the suit against the Customs Service and the Treasury to stop the importation of cut-rate gray-market products.

Rory Little, a Washington attorney representing 47th Street Photo Inc., a retailer of gray-market products, expressed displeasure with the ruling and said his client likely would petition the Supreme Court.

The Appeals Court ruling yesterday reversed a 1984 decision by the U.S. District Court upholding the Customs regulations. However, the ruling conflicts with another on the same subject handed down last year by the U.S. Court of Appeals for the Federal Circuit. The Supreme Court already has refused to hear that case, which was brought by Vivitar Corp., a camera manufacturer. Because of the conflict between jurisdictions, the Supreme Court is expected to finally rule on the issue.

In writing the opinion, Judge Laurence Silberman stated that the problem should be addressed by Congress rather than the Customs Service or the judiciary.