When a 21-year-old white supremacist named Benjamin Nathaniel Smith decided last weekend to go on a shooting rampage, his first stop was a licensed gun store in Illinois.

But the elaborate federal system designed to prevent such people from buying guns worked: The store owner checked Smith's background and refused to sell him guns because he was under a court order to stay away from his girlfriend.

And then the system failed: Smith quickly and easily turned to an unlicensed "private dealer," who sold him used .22-caliber and .380-caliber semiautomatic handguns. The dealer had no obligation to check Smith's background or make him fill out any federal forms. Police believe that Smith used the guns to kill two men and wound nine others -- acts apparently motivated by racism and antisemitism -- before fatally shooting himself.

The saga of Benjamin Smith points up the problem America faces in trying to keep handguns out of the hands of violent criminals. Thanks to lobbying by groups seeking to protect the rights of private individuals to bear arms, an estimated 40 percent of the nation's gun market is largely unregulated. The law allows tens of thousands of people to operate freely as private traders of used guns, according to estimate by academics and gun control advocates.

"There is no federal law that requires any kind of record-keeping when two private individuals make a private sale," said Forest Webb, who heads the National Tracing Center, run by the Bureau of Alcohol, Tobacco and Firearms (ATF).

This vast "secondary market" of used firearms sold by unlicensed private traders is a large unknown to federal and state authorities, Webb said.

About 4.5 million used guns are sold every year in this secondary market, roughly the same number as new firearms sold in the federally regulated retail or "primary market." The used guns are purchased at flea markets, in parking lots outside gun shows, in the homes of collectors, through want ads and gun magazines, over the Internet and among friends. A girlfriend of one of the teenage killers in the Columbine High School massacre in Colorado bought three of the guns used from three unlicensed dealers at a gun show outside Denver.

"Anyone who has a gun can be a source for anyone else wanting a gun," said Philip J. Cook, a professor of public policy at Duke University who has been studying the gun market for 30 years. "Anyone who is entitled to acquire a gun is a potential unregulated seller."

This state of affairs exists largely because Congress, under pressure from the powerful National Rifle Association, has ensured that there is no national system for registering and regulating gun sales the way there is for automobiles.

In 1986, Congress passed legislation narrowly defining a firearms "dealer" who is subject to federal regulations. The legislation restricted the definition to a person who devotes "time, attention and labor to dealing in firearms as a regular course of business" with the intent of making a profit and livelihood from it.

Licensed dealers, known as Federal Firearms Licensees (FFLs), operate under stringent rules. Under regulations issued by the Clinton administration in 1993, licensed gun dealers must be fingerprinted, prove they have legitimate shop premises, register with the local police and pay $200 for a three-year federal license, plus any state fees.

Before they can sell guns to someone, licensed dealers must give potential purchasers an ATF form to fill out, and the shop must keep the forms on file. The purchasers must affirm that they are the actual buyers of the firearms and have not been convicted of a felony or of a misdemeanor involving domestic violence. They also must provide proof of age, be a U.S. citizen, and not be a fugitive from justice or a drug user.

Under a provision of the 1993 Brady law that expired last November, a would-be purchaser had to wait five days while the dealer checked on his or her background with the FBI. These checks stopped the sale of 400,000 guns to prohibited people, according to Justice Department officials.

Since November, dealers have had to submit the names of prospective purchasers to the FBI's National Instant Check System, which has access to 36 million criminal records. The FBI has three days to respond before a sale can be completed. The system has stopped more than 100,000 felons and other prohibited persons from buying guns, according to Justice Department officials.

Almost all of these federal procedures and regulations do not apply to the private, unlicensed traders in the secondary market. The law specifically exempts from licensing anyone engaging only in "occasional sales." There is no stated limit on the number of occasional sales.

Unlike FFLs, unlicensed dealers do not have to check on the backgrounds of would-be purchasers or keep records on their sales, though a few states, such as Maryland and Pennsylvania, have imposed their own requirements. Under federal law, unlicensed dealers are required only not to knowingly sell to felons or minors.

The unlicensed loophole explains how Benjamin Smith was so easily able to obtain two guns from a private trader, Donald R. Fiessinger of Pekin, Ill. Fiessinger was arrested Thursday only because federal law enforcement officials happened to be watching him already. He had come under investigation by ATF before Smith's holiday weekend shootings because he had purchased 65 handguns from a licensed dealer and one of his guns had been seized from another person during a routine traffic stop. Fiessinger, who phoned an ATF agent Tuesday to report that he had sold two guns to Smith, had also advertised weapons for sale in a local newspaper, raising suspicion that he was more than an occasional dealer.

Such investigations of unlicensed dealers are rare. ATF officials say that proving that a private dealer has crossed the line between occasional sales and gun dealing as "a regular course of business" is extremely difficult and requires a long period of surveillance. ATF spokesman Bill Kinsella said that more than 50 percent of ATF undercover investigations at gun shows last year involved unlicensed private dealers and that 88 convictions for illegal trading resulted.

No one knows precisely how many private dealers like Fiessinger are out there. Estimates range up to the tens of thousands. According to gun control advocates, their number likely has grown substantially since the Clinton administration began cracking down in 1993 on licensed dealers, many of whom at that time were fly-by-night operators selling guns from their car trunks or at home in "kitchen table" deals.

The crackdown reduced the roster of FFLs from 286,531 to 104,727, according to ATF statistics. Private dealers have entered the gap. They constituted 25 percent to 50 percent of those participating in the 4,400 gun shows held last year, according to a Treasury Department study.

A June report on gun crime in 27 cities among people age 18 to 20, published by the departments of Treasury and Justice, noted that they were readily able to acquire used handguns from unregulated private dealers. More than half of the guns used in crimes by people age 20 and younger came from the secondary market, the report states.

In addition to weakening the system of federal background checks on gun buyers, the proliferation of the secondary market and the private traders who operate in it impairs the federal system for tracing guns used in crimes.

Tracing a new gun used in a crime is relatively easy. All of the legally manufactured or imported 4.5 million new guns that are sold annually in the United States pass through a chain of wholesalers and distributors and down, in the great majority of cases, to the 74,000 licensed dealers who operate in the primary market. (There are other FFLs, such as collectors, pawnshops and manufacturers, who are not principally involved in new gun sales.)

To trace a new gun, law enforcement officials obtain the serial number from the gun's frame and call it in to the gun's manufacturer, which then tracks the gun to the wholesaler and on to the licensed dealer. The dealer is required to maintain a record of all purchasers.

But for a used gun sold by an unlicensed dealer, law enforcement must follow the same route and then go beyond the first retail purchaser in a difficult search for all subsequent buyers, in effect seeking to establish a "chain of custody" among the private purchasers of a gun. This can prove to be impossible.

The scope of the used-gun problem was outlined in a 1994 national survey of gun owners conducted by the Washington-based Police Foundation. The survey found that 19 percent had obtained their firearms as gifts and that nearly 30 percent had received them from friends or family members. Altogether, 40 percent had obtained a gun through some source other than a regulated gun store or a pawnshop.

None of those guns would trace back to the current owners.

"There are literally millions of guns that enter, exit and reenter commerce," said ATF's Webb, "and we have no way of tracing those guns."

CAPTION: Benjamin Nathaniel Smith, above, went on a shooting rampage in Illinois and Indiana last weekend before killing himself. Donald Fiessinger, shown at left leaving jail after posting bond in Peoria, Ill., was arrested on gun charges after allegedly selling two of the weapons Smith used in the crimes.