Smith & Wesson Corp., the country's leading handgun manufacturer, has told dealers selling its products that they must immediately sign a code of ethics, the first time a gunmaker has attempted to assert formal control over the sale and distribution of its products.

Company officials said dealers who refuse to sign or are accused of abetting illegal sales will be banned from selling Smith & Wesson products.

The action comes amid a backdrop of lawsuits by 29 cities and counties, many alleging that gun manufacturers have been grossly negligent in refusing to take responsibility for the marketing of their weapons. The company's ethics code is unprecedented in the closely held firearms industry, which has traditionally resisted attempts to control the sale of firearms.

In a letter mailed in mid-July, Smith & Wesson gave its 3,500 registered dealers 60 days to pledge that they would avoid sales practices that facilitate the illegal flow of guns to young people and criminals. The two-page "Stocking Dealer Code of Responsible Business Practices" commits dealers to obey all firearms laws; to only sell Smith & Wesson guns with safety locks; and to closely monitor buyers to avoid illegal purchases.

Among the most serious accusations leveled against dealers is that they turn a blind eye to "straw purchases," sales to individuals acting on behalf of others whose criminal backgrounds would bar the transactions.

"Smith & Wesson has never been a follower in this industry," said Paul Pluff, manager of retail sales for the Massachusetts company. "We kind of like to set the benchmark."

He said "well over three-quarters" of the 3,500 dealers authorized to sell its guns have already signed and returned the code of ethics. "Those who have not responded in the next 30 days will no longer be registered Smith & Wesson dealers," he warned.

Pluff denied his company was responding to pressure from the lawsuits, saying that work on the code had been underway for more than a year. But he said he expected other manufacturers to follow Smith & Wesson's lead in light of the legal climate.

"It sounds like the industry is starting to move. It's clearly because of these lawsuits," said Brian Siebel, senior attorney at the Center to Prevent Handgun Violence, which is assisting several cities in the lawsuits. "It proves that every gun manufacturer can control distribution of its guns, a point they've denied for years."

"I think they are doing it hoping this will protect them legally," said Stephen Teret, director of the Johns Hopkins Center for Gun Policy and Research in Baltimore. "They want to be able to tell juries, 'Look, we required the dealers to follow this pledge of good conduct.' "

Teret said the main value of the ethics code was that, for the first time "gun manufacturers recognize they should follow a gun beyond the factory door."

A major theme in the lawsuits filed against gunmakers is that the companies have failed to place any controls on distributors or dealers. As a result, they have shirked all responsibility for the crime caused when their products fall into wrong hands, cities and gun control advocates allege.

"I think it's a great first step," said Wayne Roberts, spokesman for the 8,000-member National Alliance of Stocking Gun Dealers. "Now we need to see how it works and where the flaws are."

One flaw Roberts cited was that wholesalers are not covered under the new policy, so that some smaller dealers could still purchase products from wholesalers without signing the ethics code.

However, Pluff said Smith & Wesson has contracts with its 22 wholesale distributors that include an even more stringent ethics code covering marketing practices.

The company's mid-July letter to dealers declared that "the manufacturing, distribution and sales of firearms are significant and important undertakings for our businesses and the community."

In additioning to their signatures on the code, the company asked dealers to provide proof that their federal licenses were up to date, along with pictures of their shop storefronts and other details to ensure they were legitimate.

The company initially gave dealers 60 days to respond. But after learning that some dealers had not received or responded to the letter, the company granted an additional 30 days.

Some in the industry said they were most struck by Smith & Wesson's warning that it would cut off any dealer accused of questionable business practices by police or government officials. That is significant because a number of the city lawsuits name dealers as defendants along with the manufacturers.

"We have a problem with that in that [the dealers] have not been convicted of anything," said Sanford Abrams, vice president of the Maryland Licensed Firearms Dealers Association.