A federal judge in Chicago yesterday upheld the right of the suburban village of Morton Grove, Ill., to ban the sale and possession of handguns, asserting that the prohibition violated neither the federal nor the state constitution.

It was the first time in the emotional debate over the right of citizens to bear arms that a federal court has ruled an individual has no constitutionally guaranteed right to own a handgun. Attorneys for citizens opposing the village's ordinance said immediately that they would appeal.

In a 35-page decision, U.S. District Court Judge Bernard M. Decker said the Morton Grove ordinance does not violate the U.S. Constitution's guarantee of a citizen's right to bear arms. His argument was based on an 1886 decision by the U.S. Supreme Court concluding that the section of the Bill of Rights relating to the right to bear arms is subject to limitations by the states.

He also said the Morton Grove village ordinance falls within the Illinois constitution's granting of the right to have guns except where government is exercising its police powers--in this case the state's obligation to protect the general health and welfare of its people.

"Reasonable people can, in good conscience, oppose what Morton Grove has done," Decker wrote, "while equally reasonable people can fully support this ordinance."

The National Rifle Association, which had lobbied vigorously against the new ordinance, denounced the opinion yesterday at its national headquarters here. James Featherstone, NRA general counsel, said he thought the court's conclusion was "incorrect."

"We do feel the ordinance is unconstitutional within the meaning of the Illinois state constitution and the U.S. Constitution. Since the ordinance is contrary to the Constitution, no public interest can validate it," he said.

The Morton Grove board of trustees voted 4 to 2 on June 8 to ban the sale and possession of handguns by the village's 24,000 residents.

The ordinance was not inspired by a sudden rise in village crime. The last Morton Grove murder involving a handgun was in 1979, and police records show no handgun-related rapes since at least 1958. The issue came up because of an attempt by a businessman to open a handgun store in town.

Neighbors decided they didn't want handguns to be sold next door. The trustees first moved to ban the sale of handguns, and then decided to go one step further and ban possession as well.

The ordinance requires citizens to turn in their guns, and provides for fines of up to $500 and up to six months in jail for those convicted of violations.

It does not, however, prohibit handgun possession by collectors, military personnel and target shooters.

The ordinance is among the most stringent enacted in the United States, and it was immediately challenged in court as an infringement on the constitutional right to bear arms.

Locally, the village council of Montgomery County's Friendship Heights passed a handgun ban in October, only to be told by a county council attorney that Maryland law prohibits localities from regulating handguns. Undaunted, the village council recently enacted a ban on bullets, except for those used for law enforcement or hunting, said Councilwoman Cleonice Tavani. The revised ordinance must be approved by the Montgomery County Council.

In Virginia, the state's Dillon Rule would prohibit a locality from passing an ordinance banning handguns, said a former state official.

"The Dillon Rule says that a locality doesn't have the power to enact a local ordinance unless it is delegated by clear implication or by the general assembly," said former Attorney General Andrew Miller.

With the passage of a law in the mid-1970s, anyone in the District of Columbia who didn't own a handgun then could neither buy nor bring a handgun into the District legally unless he was a collector, a law enforcement officer or had been willed a registered gun from a deceased person's estate, according to Metropolitan police spokesman Hiram Brouton.

Those who already owned handguns were not required to turn them in, but had to register them, Brouton said.

Judge Decker wrote yesterday that the Morton Grove trustees "must have been aware of the deep-seated conviction of a number of its citizens that they should be permitted to retain handguns for the protection of person and property.

"The trustees concluded, however, that the public interest outweighed the claimed personal interest of the opponents of this legislation. The ultimate settlement of this troublesome political question must be returned to the citizens of Morton Grove where it properly belongs rather than in the court."

Martin Ashman, a Chicago lawyer who serves as the village attorney, said in an interview yesterday, "We broke a longstanding American tradition which had turned sour--the tradition that you're a macho man if you wear sidearms and are able to use them."

The effective date of the ordinance had been suspended pending Decker's ruling, and Asher said the decision on when it should go into effect will be made Jan. 11 when the trustees hold their next regular meeting.