A 39-year-old mental patient, released on a weekend pass from a state hospital, walked into a Fairfax County firing range Saturday, rented a handgun, fired several times at a target, then placed the gun in his mouth and fatally shot himself, police said yesterday.

The director of the Northern Virginia Mental Health Institute, where Omar M. Khaled was a patient, said yesterday that the institute is investigating whether Khaled was supposed to be supervised by guardians or relatives.

Robert E. Strange, the director, said patients at the 114-bed Fairfax facility who have shown improvement under treatment are authorized by psychiatrists to be released on passes.

"After a patient has made sufficient improvement, patients are given passes, maybe overnight, maybe for one day, maybe over the weekend. Sometimes with family members, sometimes alone," Strange said.

Strange said he could not comment on what kind of treatment Khaled had received, how long he had been a patient at the institute or whether he had been committed by a court.

Ernie Lyles, a co-owner of the Gilbert Small Arms Range in Springfield, said yesterday that Khaled paid about $30 in dues and signed up as a monthly member.

A range master briefed Khaled on the range rules and showed him how to use the Glock 9mm semiautomatic handgun, Lyles said. Khaled shot at a target a few times, Lyles said, and as the range master walked away, he turned to see Khaled putting the gun into his mouth said.

"He was yelling for the person to stop it. He got within three or four feet of the gentleman when it happened," Lyles said, adding that the range master and other customers at the range were shaken by the incident.

"If someone is going to commit suicide, I really don't think anything will stop them," Lyles said. "I really wished he hadn't come in here that day. He's affected a lot of people by doing this. We have quite a few very upset employees. I had to clean the mess up. I hope I never have to do it again."

Lyles said there is no way to prevent a mentally ill person from renting a gun. He said a question on the form signed by Khaled asks applicants whether they are convicted felons or whether they could legally own a firearm under federal and state laws. Lyles said Khaled gave an Alexandria address and signed the form.

Federal and state laws prevent anyone who has been committed to a mental health facility by a court from possessing a weapon. However, when a person rents a gun at the range, Lyles said, no police check is made.

Emmett Masterson, a spokesman for the Bureau of Alcohol, Tobacco and Firearms, said yesterday: "The law states you have to be committed by a court. Then again, if he is committed by a court and decides to get a gun and lies on the form, he could still get one by lying on the form. If someone has the intention of killing himself, no law is going to prevent it."