A new study indicates a decline in the overall number of handgun-related deaths in the District of Columbia since the city's strict gun-control law went into effect in 1977, including a sharp decrease in the number of persons shot to death by a boyfriend, spouse or acquaintance.

But the same study shows a contrasting increase in the proportion of handgun-related deaths at the hands of strangers during burglaries, street robberies and other crimes.

The study written by former Justice Department analyst Edward D. Jones III, seems to confirm D.C. police homicide squad findings of a major shift in the traditional pattern of slayings in the city.

Random stranger-on-stranger shootings -- committed during robberies, narcotics dealings and other criminal activity -- appear to be rapidly on the way to replacing domestic homicides as the major cause of violent deaths here, homicide detectives say.

However, both police officials and researchers for the National Rifle Association, the national gun lobby headquartered here, questioned whether the shifts can be attributed to the city's gun-control law, as suggested in the Jones study.

Police say basic information on the motivations for many of the slayings is unreliable. The NRA, which opposes gun control, attacked what it called the skimpiness of Jones' statistics, and said handgun homicides have generally decreased in recent years in most parts of the nation, regardless of whether they had gun-control laws or not.

The D.C. gun law, one of the toughest and most controversial in the nation, was implemented in February 1977. It required the registration of all currently owned handguns, rifles and shotguns, and froze the number of legal handguns by banning the sale or possession of additional handguns by private citizens. The law also requires residents to keep pistols unloaded and inoperable.

Jones' study compared handgun homicides in 1974 with handgun homicides in 1978, the first full year after the law went into effect.

It showed that family killings decreased from 10 percent of all handgun homicides in 1974 to 5 percent in 1978, and that homicides among neighbors, lovers and other nonfamily acquaintances dropped from 44 percent to 38 percent.

At the same time, crime-related street slayings involving strangers, jumped from 32 percent to 40 percent of all homicides. While the proportions of domestic and street homicides shifted, the total number of handgun slayings also changed dramatically, dropping from 174 in 1974 to 112 in 1978.

Jones then compared these figures with those for Baltimore in the same time frame. Contrary to the D.C. data, Baltimore showed an increase in family homicides from 10 percent to 14 percent of all handgun killings, nonfamily acquaintance homicides remained at about 29 percent and there was a decrease in the proportion of stranger-on-stranger street slayings, from 32 percent to 22 percent.

Jones chose Baltimore for comparison because no new gun-control law was implemented there during the study period and because the existing law is relatively lax. It permits the purchase of handguns after a seven-day waiting period and a police check on the purchaser's criminal record.

Jones concluded that the Washington-Baltimore statistics are "not inconsistent with the hypothesis that the [D.C. gun law] had a beneficial impact on handgun homicide. First, by constraining availability of handguns in the home and requiring registered handguns to be immediately inoperable, the [law] would tend to reduce the relative frequency of 'within-family' and 'outside-family' handgun homicides."

On the other hand, Jones said, the law seems to have had little effect on the street criminal, who can easily acquire handguns elsewhere and pursue his "single-minded intention to engage in criminality."

Jones' study, scheduled to be published in the May issue of the Annals of the American Academy of Political and Social Science, differed from an earlier study of the D.C. gun-control law by the U.S. Conference of Mayors.

That study reported that handgun crime in general declined after implementation of the law. But it did not distinguish, for example, between domestic homicides and street slayings or show the shifting patterns indicated in Jones' study.

Police and NRA officials, critical of the Conference of Mayors report, were no less critical of Jones' effort. NRA researcher Paul Blackman said the figures showing a decreasing percentage in domestic handgun homicides does not demonstrate whether a real decrease occurred or if the killers "used a substitution weapon," such as a club, rifle or poison.

D.C. police officials said the number of handgun homicides in the city has fluctuated unevenly since the 1978 period of the Jones study, but appeared to have increased significantly in 1980, making it difficult to say whether the trends claimed by Jones are continuing.

A breakdown of domestic and street handgun homicides in 1979 and 1980 was not immediately available. However, D.C. homicide detectives say they have sensed a significant increase in stranger-on-stranger homicides in the last two years.

D.C. City Council member David Clarke, chief architect of the D.C. gun-control law, said the Jones study shows the bill has had some good effect. "The bill is not a panacea," he said, but "if it saves any lives, it's been worthwhile."

Jones, a senior economic adviser in the Justice Department, resigned recently to pursue a private career after spending six years studying the hand-gun issue in the government.