Black & Decker Inc. has been ordered to stop selling a rechargeable flashlight by a federal judge in Chicago who ruled this week that it infringes on a First Alert patent.

The judge ruled that the three-way switch used in the Towson company's Flashliter models is too similar to one used in First Alert flashlights.

Officials of Black & Decker, the world's largest maker of power tools, admitted sending samples of the First Alert flashlight to its Japanese manufacturer, Yamada Electric, in February 1986 to develop a similar product, U.S. District Judge James B. Parsons wrote in his ruling. "The {B&D} flashlight turned out to be almost identical to Pittway's," he wrote.

BRK Electronics, a division of Pittway Corp. of Illinois, has taken in about $30 million selling more than 3 million of the flashlights under the First Alert brand name, according to court papers. Since fall 1986, Black and Decker has sold about 500,000 rechargeable lights, priced at $15 and $20. More than half were sold before Pittway received its patent, according to company officials.

On both brands, sliding the switch from "on" and "off" to "recharge" rotates prongs out, allowing the flashlight to be plugged directly into an electric socket. "If you looked at the two switches, they're basically the same thing -- the same parts, the same mechanism," said Fred Conforti, president of BRK Electronics.

B&D Vice President Barbara B. Lucas said the technology for the switch is "generic" and should not be restricted by a patent. She stressed that the injunction is preliminary and the case may still go to trial.

B&D had made rechargeable flashlights but none could be plugged directly into electrical sockets or had rotating prongs, the court ruling said.

BRK, which also manufactures smoke detectors and fire extinguishers, introduced the First Alert rechargeable flashlight in 1985 and received a patent on the switch in March of this year. Lucas said B&D did not know when it began making the flashlights that a patent was pending on the switches.

Lucas said B&D has stopped selling the Flashliters and has no more in inventory. Some samples might still be on retailers' shelves and could be sold to consumers under the terms of the court order, she said.

"It's a moot point. We have redesigned the product and are no longer selling it. We redesigned the switch mechanism," said Lucas.