Montgomery County prosecutors will drop a weapons charge against a former employee of Georgetown Preparatory School because Maryland law specifically forbids guns only at public schools, not private ones.

“The charges are just simply not applicable,” Assistant State’s Attorney Keith Jacobsen said Tuesday in court.

Prosecutors said the little-known loophole in state law makes little sense. “The General Assembly needs to close this,” State’s Attorney John McCarthy added after the court hearing. “Why any schools would be excluded is mystifying to me.”

The case involves Stephen Lafferty, 51, who enjoys hunting deer with a powerful .50-caliber revolver. As of early November, he directed the building and grounds department at Georgetown Prep, a private school just north of the District. At that time, an employee spotted the gun in Lafferty’s office, took a picture and sent the image the school’s dean of students, according to court records.

Police were called, summoned him outside and asked him if he had a gun. “There is a revolver on my desk,” Lafferty responded, according to arrest records. “You can go in and get it if you want.”

The officers found an unloaded Smith & Wesson Model 500 with a scope, the records state. Lafferty told them he lives in Frederick and the man who works on his scope lives in Prince George’s County — making Georgetown Prep a good meeting place.

Officers charged Lafferty with having a “deadly weapon on school property.” They also searched Lafferty and found a socket that held the odor of burnt marijuana. Because metal socket components can be used in marijuana pipes, officers charged Lafferty with possession of drug paraphernalia.

He was taken to the county jail on Nov. 6, posted a $10,000 bond and was released that day, according to court records.

In an interview Tuesday, Lafferty’s attorney, Dino Flores, said Lafferty was fired by the school after the incident and that he uses the weapon for deer hunting. That’s how Smith & Wesson describes its Model 500. “Most powerful production revolver in the world today,” the company states on its Web site. “A hunting handgun for any game animal walking.”

Different laws in Maryland cover when and where citizens can have handguns. In Criminal Law Section 4-203, people are not supposed to carry guns — unless they are law enforcement officers, have a carry permit or are transporting an unloaded gun to such locations as repair shops and hunting spots.

Another part of law, 4-102, forbids people from taking “deadly weapons” on school property. There are exceptions for police officers and organized shooting activities, presumably rifle teams and such. But the key phrase in the law reads: “A person may not carry or possess a firearm, knife or deadly weapon of any kind on public school property.”

Lafferty was to appear in court on the original counts Tuesday morning. He could not make it because of the snow, and District Judge James Sarsfield agreed to postpone the matter until Jan. 9. But Jacobsen, the prosecutor, said he will be dismissing the weapons charge.

“The statute, 4-102, does not apply on private school property,” Jacobsen said, adding that prosecutors had looked into 4-203 and consulted with state police experts about what laws might apply in the case. “It seems there really aren’t any.”

The drug paraphernalia charge will be dropped if Lafferty completes a county education program — standard practice for a defendant with an otherwise clean criminal record who has been charged with a minor drug crime, according to Jacobsen.

Flores said Lafferty’s office was not near any students. He said that his client doesn’t have a carry permit but didn’t do anything illegal. “He doesn’t walk around with it on his hip,” Flores said. “He’s a decent guy who tried to make sure he was doing things the right way.”

A spokesman at Georgetown Prep declined to comment on the case or Lafferty.

“This gap in the law is of grave concern to the police department, and I am sure many others,” said Assistant Montgomery Police Chief Russ Hamill. “We will seek assistance from our legislative partners to include all educational facilities as protected places within the law.”

Officials reached Tuesday could not immediately explain how the law got on the books in the first place. McCarthy said the exception could have been purposely inserted, or the law might simply have been poorly written.