When Michael Fagan dropped in on Queen Elizabeth in her bedroom last July, it is unlikely that he had in mind making British jurisprudential history. But that is what he has done by getting acquitted of any wrongdoing in the incident--a case, said one outraged British newspaper today, that is the craziest since the "Knave of Hearts in Alice in Wonderland."

Fagan was tried yesterday on a charge of quaffing some wine on a nocturnal visit to Buckingham Palace that took place a month before he accosted the queen. Prosecutors were unable to devise an appropriate offense under British law for an unauthorized visit to the monarch, so they charged him instead for burglary of a half-bottle of Johannesburg Riesling.

The jury acquitted him in 14 minutes after a day of heated testimony.

That heat was nothing compared with the reaction today in the British press. "Bonkers" said the Sun. Fumed the Mirror: "There are times when to call the law an ass is to insult asses." "What can we say of British justice?" the Daily Mail exhorted. "That truly it is the eighth wonder of the world."

The jury was not passing judgment on whether Fagan had entered the palace on two occasions, "sat on the throne," as he cheerfully acknowledged, or, specifically, had some wine from a cupboard of gifts sent to Prince Charles. It merely decided that he had not committed a crime in doing those.

The Sun, Britain's biggest-selling tabloid, which invoked "Alice in Wonderland" in its denunciation, said today that the verdict "solemnly declared open house at the Queen's residence."

In fact, the case may well lead to a tightening of the laws, much as it has already produced an overhaul of security procedures at the palace. Home Secretary William Whitelaw, whose department oversees the police, said today that while he could not comment on the jury's verdict, he did expect "a great outcry" to look at the relevant laws, "and no doubt it will be considered."

What Whitelaw had in mind apparently was that trespass is not a criminal offense in Britain if there is no other offense involved.

Meanwhile, for all the furor, Fagan is still behind bars, awaiting trial for assaulting his stepson.