Sniper suspect John Muhammad never should have been in possession of the Bushmaster XM-15 rifle linked to the deadly shootings in the Washington area because he was legally barred from owning firearms as part of a restraining order issued more than two years ago, according to court records and officials.

Authorities with the FBI and the Bureau of Alcohol, Tobacco and Firearms worked this week to trace the path of the weapon to determine how Muhammad got it. The gun's manufacturer said it was sent in June to a dealer in the Tacoma, Wash., area.

Whether Muhammad obtained the weapon through a dealer purchase or some kind of private sale, gun-control advocates said yesterday that the case underscores shortcomings in the nation's firearms background check system.

"The fact that a person like Muhammad could so easily obtain a gun like this and use it for this purpose is exactly the problem," said Matthew Nosanchuck, legal director for the Violence Policy Center, which advocates stricter gun-control laws. "No matter how he got it, he didn't get it legally."

Muhammad was restricted by a protective order issued in Pierce County, Wash., Superior Court on March 17, 2000 -- and renewed in subsequent decisions -- which restrained him from harassing the woman who was then his estranged wife.

Under federal law, that order prohibited him from buying or possessing firearms. Yet since then, Muhammad has been in possession of at least three, and possibly five, firearms, according to court records and officials.

Muhammad is being held on a federal firearms charge involving a Bushmaster XM-15 that he bought from Welcher's Gun Shop in Tacoma on Dec. 29, 1999, for $799. In May 2000 -- two months after the protective order was imposed -- he sold the same gun back to the shop for $500, according to manager John Welcher.

In addition, according to an affidavit filed in federal court in Seattle in connection with the firearms charge, a friend of Muhammad's, Robert Edward Holmes, told FBI agents he had seen Muhammad in possession of guns twice in the last six months.

The first time, about six months ago, Muhammad "and an associate" had an assault-type rifle similar to the Bushmaster and a hunting rifle, Holmes said. During the second visit, about four months ago, Muhammad again had an assault rifle of the type used in the sniper shootings, this time outfitted with a scope and carried in an aluminum briefcase, court records show.

Alan Faraday, spokesman for Bushmaster Firearms Inc., said the gun linked to the sniper killings was sent to the Tacoma area from the manufacturer in June.

Faraday declined to name the gun dealer, and federal officials late yesterday declined to say whether they had determined how Muhammad obtained the last rifle.

If Holmes is right about the timing of his first meeting with Muhammad, the assault rifle he said he viewed in or around April could not be the same one used in the sniper slayings.

Another weapon that may have been in Muhammad's possession illegally is the .22-caliber handgun used in a robbery and fatal shooting at a liquor store in Montgomery, Ala., on Sept. 21. Muhammad was charged with murder yesterday in that robbery, along with his companion, 17-year-old Lee Malvo. A latent fingerprint linked to Malvo was found on a magazine about guns that was left at the scene of that shooting.

The handgun in the Alabama case has not been recovered, investigators have said.

Malvo, a Jamaican citizen, could not legally purchase or own a gun in the United States because he was in the country illegally, authorities said.

Andrew Arulanandam, a spokesman for the National Rifle Association, said the NRA favors improvements to the national criminal-background check system to stop prohibited people from buying guns.

"NRA has long lamented the fact that the system is woefully inadequate," Arulanandam said. "There is no reason for the system not to work."