The D.C. Court of Appeals, clarifying the home-rule authority granted by Congress to the District, upheld yesterday the city's tough gun control law, considered one of the stiffest in the country.

In a unanimous opinion, the three-judge appeals panel said that although the Home Rule Act left control of the D.C. Criminal Code to the Congress, the city maintained the power to change local police regulations - the bases for the gun control legislation.

The National Rifle Association, joined by 10 individuals and two businesses, had contended that the legislation was invalid because it altered policies set down in the code-authority that they contended rested only with the Congress.

Judge Catherine B. Kelly, writing for the court, said, however, that such an argument would mean that the City Council would be powerless to act in many areas traditionally left to local control - like police regulations.

The gun control law, enacted in September 1976, prohibits the possession of handguns by anyone other than police officers and security guards. During a grace period that lasted until February 1977, guns purchased before September could be reregistered with the District police and held legally.

Possession of certain types of rifles and shotguns is permissible under the law, known as the Firearms Control Regulation Act of 1975, provided those weapons are properly registered with the police department.

The act was intended to freeze the number of handguns in the District and sets out minor criminal penalties for violations, JudgeKelly said. She was joined in the decision by Chief Judge Theodore R. Newman Jr. and Judge Stanley S. Harris.

The D.C. Corporation Counsel'sOffice was joined in defense of the law by the National Council to Control Handguns, a nonprofit lobby that has 1,200 District members.

Charles Orasin, the group's executive vice president, called the appeals court decision a victory over the "unlimited treasury" of the National Rifle Association, which had fought the legislation from the start.

Although Washington may have one of the nation's toughest gun control laws, Orasin said, the laws are less restrictive in Virginia and Maryland. That results in "leakage" into Washington of guns purchased in those states, illustrating the need for uniform, national gun control legislation, Orsin said in a telephone interview.

A spokesman for the National Rifle Association said yesterday that officials there would have no comment on the matter until their study of the appeals court decision was complete.

Tedson J. Meyers, who represented the National Rifle Association and the other individuals and businesses in the appeals court, also declined to comment pending further review of the ruling. Meyers could ask the full cppeals court to review of the ruling. Meyers could ask the full appeals court to review his clients' case or the matter could be taken to the U.S. Supreme Court.

The appeals court also rejected arguments that the law was so vague as to make it unconstitutional, that it discriminated against certain classes of citizens and that it imposed criminal penalties on anyone who failed to register a gun, whether they knew about the requirement or not.