WASHINGTON (AP) _ The Department of Housing and Urban Development and the mayors of Atlanta, Detroit and Miami on Saturday directed their law enforcement agencies to give preference to Smith & Wesson when buying guns and called on municipal leaders nationwide to follow suit.

The directive gives preference to ``any gun makers that adopt a new code of responsible conduct,'' but _ for the time being at least _ that directs all of the gun and ammunition business generated by the country's 3,200 public housing authorities and the police and sheriff's departments of three of the nation's biggest cities to use Smith & Wesson products.

The company signed an unprecedented agreement with the Clinton administration on Friday to include safety locks with all of its handguns to make them more childproof.

In return, the agreement calls for federal, state and city lawsuits against the gun maker to be dropped and says no new suits will be filed seeking to hold them responsible for shootings committed with their guns.

``Any company that signs this agreement deserves our support and our business for acting responsibly,'' HUD Secretary Andrew Cuomo said. ``It would be near lunacy to patronize a company more likely to be providing criminals guns when you are in the business of hiring police officers to fight the criminals.''

Smith & Wesson spokesman Ken Jorgensen said he was pleasantly surprised by the announcement.

``I would have to say it's good news for Smith & Wesson. It certainly wasn't part of anything that was discussed as part of the agreement,'' he said.

Cuomo, Atlanta Mayor Bill Campbell, Detroit Mayor Dennis Archer and Miami-Dade County Mayor Alex Penales urged local governments around the country to issue a similar directive to their law enforcement agencies.

It was not immediately clear how much business the directive would generate for Smith & Wesson, but Cuomo said that approximately one-third of gun purchases in this country are made by federal, state and local law enforcement each year. HUD's annual budget for security at public housing complexes is close to $1 billion per year, HUD spokesman David Egner said.

The company does not release annual sales figures, whether they be to private buyers or government agencies, Jorgensen said.

There was no ``quid pro quo'' giving Smith & Wesson the government's business in exchange for the company's cooperation, HUD officials said.

``If another manufacturer adopts the code tomorrow, that manufacturer will get the same preference,'' Egner said.

Cuomo acknowledged that the move could bring large market pressures to bear Smith & Wesson's competitors.

``You could say that it is an incentive,'' he said.

National Rifle Association spokesman Bill Powers declined to comment.

The president and CEO of the National Shooting Sports Foundation, Robert Delfay, did not return a telephone message left at his office Saturday seeking comment. On Friday, after the initial announcement, Delfay criticized the pact, saying, ``I am deeply disturbed by the fact that Smith & Wesson has allowed the Clinton-Gore Administration to manipulate the company in this manner.''

The directive does not order the agencies to immediately replace all of their guns with Smith & Wesson products, but rather from this point forward, to purchase them from gun makers that adopt the new code.

A spokesman for Archer said Detroit's competitive bidding process dictates that Smith & Wesson cannot be mentioned by name, but it can be administered in a way that only Smith & Wesson, or any other gun maker that agrees to the Clinton administration's terms, can actually bid.

``It's not a hard thing to do,'' said spokesman Gregory Bowens. ``By doing so, we would try to make them the gun maker of choice for Detroit's law enforcement agencies.''

Bowen said he could not estimate how much money the city spends on handguns for its police department, but said, ``We have several classes of new police officers every year, and each one of those officers needs a handgun.''

Under the agreement, Smith & Wesson will install external locks within 60 days, with internal locks to be installed within two years. The company also agreed to a ``code of conduct'' for selling and distributing handguns that prohibits the marketing of weapons in a way that appeals to juveniles or criminals, and Smith & Wesson will devote 2 percent of firearms revenues every year to developing ``smart'' technology that limits a gun's use to its rightful owner.

The directive issued Saturday also encourages municipal authorities to apply the same requirement to private subcontractors that provide security.