Lee Harvey Oswald's brother obtained a temporary court order last night to prevent the opening of his brother's grave in an attempt to check out another Kennedy assassination theory.

An attorney acting for a British assassination theorist said yesterday he had received permission from Oswald's widow to dig up Oswald's grave to check the truth of allegations that it really contains the body of a Soviet KGB agent.

The amateur theorist, 77-year-old Michael Eddowes, has published three books saying, among other things, that the assassin of President Kennedy was actually a lookalike Soviet agent two inches shorter than Oswald's 5 feet 11 inches.

The Dallas County medical examiner agreed to examine the body along with a team of forensic pathologists hired by Eddowes. In addition to checking the body's height, the specialists planned to check teeth against dental records and look for a scar behind the body's left ear where Oswald once had a mastoid bone removed. This scar was not mentioned in the report of the autopsy conducted after Oswald's death in 1963.

Eddowes has been attempting unsuccessfully for more than a year to get a court order allowing an exhumation. Yesterday he announced that Oswald's Russian-born widow, Marina, had agreed, as Oswald's next of kin, to authorize the opening of the grave.

"I didn't get paid," she said yesterday from her home in Rockwell, Tex.

"Even though for myself I don't have to have proof of identification of the body," Marina Oswald Porter said, "I choose this very uneasy road where no matter which way you go, you will be ridiculed." She wanted to face the task herself, she said, of putting to rest speculation instead of putting the burden on her children.

Eddowes is a somewhat eccentric British lawyer who obtained a pardon in Britian for a wrongfully convicted murderer in 1953. Since 1963, he has insisted in several books that Lee Harvey Oswald went to Russia as a defector but never returned because he was replaced by a KGB double.

Eddowes claimed in a civil suit in January 1979 that Oswald was not the man buried in a grave marked "Oswald" in Rose Hill Memorial Park in Fort Worth. His case was dismissed for lack of standing because he was not a U.S. citizen.

Oswald's brother, Robert, obtained a temporary restraining order to prevent the exhumation late yesterday after news of Marina Oswald Porter's decision leaked out.

Robert Oswald's wife said last night from their Wichita Falls home that he had heard the news of the planned exhumation yesterday morning, and had been so upset he had immediately gone to his lawyer. "Wouldn't you be upset?" she said.

A hearing on the restraining order has been set for Aug. 22. Jerry Pittman, Eddowes' attorney, dismissed the effect of the order as "just a delay."

A second problem has arisen over ownership of the grave. Cemetery representative Janice James said Marina Oswald Porter is not the owner of the plot. The owner is a "private individual" whom she refused to name.

A friend answering the phone at the Porter residence yesterday said, "Marina has no idea who purchased the grave lot."

If the exhumation takes place, it will be in pursuit of a theory which most assassination investigators have never taken seriously.

Cornell professor Robert Blakey, chief counsel to the House Assassinations Committee, spoke out angrily on hearing of the plans.

"It is obscene that any effort is being made to exhume Oswald's body. It is obscene because it distracts attention from the real issue -- who was behind Oswald."