BOSTON (AP) _ Gov. Michael S. Dukakis signed legislation Saturday banning assault weapons in Boston, saying he'd like to see greater gun control across Massachusetts and the nation.

''Semiautomatic assault-style weapons are designed for one purpose and one purpose only,'' Dukakis said. ''They are designed to kill other human beings as fast as possible.''

The ban prohibits the sale of six military-style weapons, and requires anyone who already legally owns one to register it with the police commissioner. It also bans certain shotguns and rifles.

''This is a message to drug dealers and gangs bent on violence that we simply will not tolerate these weapons or the violence or destruction that they bring,'' the governor said at the signing ceremony at an inner-city police station.

Police Commissioner Francis Roache said the ban is not a panacea for Boston's drug or gang problems, but is an important step in the community's response to violence.

''It's going to be a long and painful process until we fully come to the realization that we're the most violent society in the world and we have an attitude problem,'' Roache said. ''So we begin like this, one city changing laws and changing attitudes.''

The new law gives the commissioner power to place any firearm on the list of proscribed weapons for 30 days while a board, provided for in the legislation, decides whether to permanently add the gun to the list.

The measure began as a home-rule petition from the City Council in the spring. The Legislature approved it late last month after a lengthy debate.

Michael Yacino, president of the Gun Owners Action League, described it as the toughest firearms regulation in the state, but maintains it will do nothing to stop the gang-related violence it targets.

Gang- and drug-related slayings are rarely committed by licensed gun owners, Yacino argued, and more homicides are committed with handguns than assault weapons.

Mayor Raymond L. Flynn said tapping the community's outrage over violence turned the tide in the Legislature.

''We probably had more community meetings and discussions about lobbying state legislators for this legislation than any other,'' Flynn said. Lawmakers' offices were flooded with phone calls in support of the bill.

''It's not enough to do it just for Boston, it's time we did it for all of Massachusetts and all of America,'' Dukakis said. ''These are weapons that belong on the battlefield, not in crack houses or in the neighborhoods.''

The law bans the sale or illegal posession of the AK-47 semiautomatic rifle; the Uzi semiautomatic rifle; the FN-FL semiautomatic rifle; the FN-FNC semiautomatic rifle; the Steyr Aug semi-automatic rifle; and the SKS semiautomatic rifle.

It also bans all shotguns with revolving cylinders and semiautomatic rifles with fixed magazine capacities of more than 10 rounds, as well as modifications of any proscribed weapons.

The first offense under the ban carries a $1,000 fine. Subsequent offenses carry penalties up to 2 1/2 years in jail.

The Bush administration imposed an import ban on assault-type rifles in July, but the ban didn't affect guns already owned by Americans or similar weapons produced by U.S. companies.

California in May became the first state to enact restrictions on the possession or sale of such guns. The law was prompted by the shooting of 35 people at a Stockton, Calif., schoolyard by a gunman with an AK-47.

Cities and counties in Georgia, Illinois, Indiana, New Jersey, New York, Ohio, Colorado and Texas also have enacted ordinances with certain restictions.