It took six weeks of sometimes round-the-clock detective work - including telephone taps - but Maryland state Police believe they have unmasked the Phantom of Westminster High School.

The agile, elusive prankster, they say, is really a 44-year-old cleaning woman named Hilda May Logue.

However, although a prepared police statement released yesterday said that Mrs. Logue is believed responsible for "several previous acts of vandalism and telephone misuse," attributed to the Phantom, no charges have yet been brought against Mrs. Logue by police or the Carroll County State's Attorney's office.

For weeks, fact and rumor about the Phantom's action had mingled inextricably as tales of its mysterious phone calls and surreptitious midnight feasts swept through the school.

The Phantom stole a skateboard, it was said, and rode it among the beams above the ceilings in the home economics room, and invited others to join, the story went. The Phantom eluded a gaggle of 20 police officers, who two weeks ago searched places in the school not seen since construction workers put on the the school roof.

"I can't separate fact from fiction in this business any more," chuckled school principal Norris Weis yesterday. "But it was great. Morale was good, and the whole business was not a hurtful thing as far as the school was concerned."

There was no doubt, however, the some of the actions attributed to the Phantom actually occurred. There were the magazines, left fanned out like a hand of playaing cards, found by school officials when they unlocked their offices in the morning. There was a midnight feast in the home economics room.

Then there were the mysterious phone calls.

The police statement on the case said that tracers had been put in on school telephones to see where the Phantom called from when it used phones late at night. Troopers followed this up with around-the-clock surveillance at the school.

At 1a.m. Saturday, the police said, Mrs. Logue was apprehended "vandalizing a locked office in the school." Lt. Neill bechtol, who oversaw the investigation, said that phone tracers were helpful. But he would not explain how in detail since charges are being weighed against Mrs. Logue, he said.

Police yesterday noted that, although they believe Mrs. Logue was responsible for minor acts of vandalism, none of these acts actually were destructive.

Bechtol added that the legend of the Phantom seems to have a life of its own, going far beyond provable fact into the realm of tall tales. "So many of the stories that were started we could never substantiate," he sighed.

"Nobody ever came forward and told us his skateboard was stolen. And when we'd interview somebody we thought had seen something, we'd find out they'd just heard about it from someone else.

"A lot of the stories were just phantoms," he said.

The lift the whole business gave to school life, however, was very real. "The kids had a great time with it. If it's coming to a conclusion. I know they'll be sorry," principal Weis said yesterday.

"It's been capricious. It cost a little more money for security police - maybe $1,500 - and I'm sorry about that. But it was only capricious. You have to draw a narrow line between frivolity, which you have to keep, and panic, which you can't let take over . . . "

Weis also refused to rule out the possibility of new Phantom imitators springing up. "There probably will be. But that, too, will pass . . . I'm just hoping for a little transquility."