The only law in the United States banning handguns in a major city took effect in San Francisco today, but police and gun shops reported no rush to turn in firearms.

San Francisco police said only 15 handguns had been turned in before the 90-day grace period for city residents to rid themselves of the now-illegal weapons began today. Nathan Yee, a salesman at the San Francisco Gun Exchange, said the new law had led to some canceled orders for handguns but the numbers of people selling guns to his store--one legal way of observing the new law--had not increased.

The law, inspired by a similar ban in the small Chicago suburb of Morton Grove, Ill., is already being challenged in court. The Second Amendment Foundation and the National Rifle Association have filed suit, and even San Francisco District Attorney Arlo Smith said he believes the ban is unconstitional because a state law preempts action by California cities on gun control. The city of Berkeley has delayed implementation of its own handgun ban until the courts rule on San Francisco's.

Smith said he will not prosecute anyone under the new law until the courts settle the issue and police have said they plan no door-to-door search for guns when the grace period ends. The Citizens Commttee to Keep and Bear Arms, a national organization based in Bellevue, Wash., is raising funds to defeat San Francisco supervisors who supported the ban. It has also prepared a "I hate San Francisco" bumper sticker, with hate symbolized by a red heart with a black slash through it.

William Strawn, a spokesman for San Francisco Mayor Dianne Feinstein, said the mayor planned to turn in her own Smith & Wesson .38 caliber Chief's Special to police in a ceremony Friday. He said she acquired the gun while serving as a city-county supervisor in the 1970s after a local terrorist group shot out some windows of her home.

Police said the gun turn-in program would be kept confidential to encourage owners to surrender their weapons, and that figures for numbers of guns turned in would not be released.

"The whole idea is to reduce the availability of handguns and try to reduce the pool of handguns that is created through burglaries," Strawn said. The new law, passed June 30 by a 6-to-5 vote of the board of supervisors, exempts gun stores, security guards, gun clubs, gun collectors and other citizens who can demonstrate a need to own a gun. Rifles and shotguns remain legal and do not require permits.

For several years, polls have shown strong support in San Francisco for gun control, but the city was spurred to action after the Morton Grove ban stirred its own memories of the 1978 murders of Mayor George Moscone and supervisor Harvey Milk.

A National Rifle Associaiton spokesman pointed out, however, that former supervisor Dan White, who killed Moscone and Milk with a handgun, probably would have been exempted from the law because he was a former police officer.

Michael Kenyon, of the Citizens Committee to Keep and Bear Arms, said the San Francisco law "interferes with our civil rights."