Political extremist Lyndon H. LaRouche Jr., ignoring the advice of his lawyers, spent four hours testifying yesterday before a federal grand jury in Boston that is investigating alleged obstruction of justice by him and his organization.

LaRouche's appearance is the latest twist in a complex 32-month investigation of the perennial presidential candidate and his associates that has already prompted $21 million in contempt of court fines against his group and bankruptcy of three of his related entities.

LaRouche, who returned last week from a seven-month stay in West Germany, told reporters after his voluntary grand jury appearance that one reason he returned to the United States and testified was to protest what he considers unfair tactics by federal law enforcement officials investigating his associates.

"Someone had to have the guts to stand up before a grand jury," said LaRouche, who is running for president as a Democrat. He said Justice Department officials are "lying" in securing indictments of 13 of his associates for obstruction of justice and credit card fraud.

LaRouche's attorney, Odin Anderson of Boston, said that he and LaRouche's other lawyers advised him against appearing before the grand jury, but that LaRouche had a "damn the torpedoes" attitude that prompted him to "confront this grand jury."

LaRouche was not subpoenaed by the grand jury, although he has been subpoenaed to appear in the federal trial of his associates, scheduled for September. Prosecutors have said in court documents that they have a criminal case against LaRouche for obstruction of justice, and that federal prosecutors in Alexandria also have a criminal case against him involving personal income taxes.

Under an agreement previously reached by prosecutors and LaRouche's lawyers, LaRouche delivered an uninterrupted 45-minute statement of his defense and his political views, then he was questioned by the prosecutor and members of the grand jury. Anderson said LaRouche never exercised his right to leave the grand jury room to ask questions of his lawyers, and never exercised his Fifth Amendment right to avoid answering questions that could incriminate him.

John Markham, the assistant U.S. attorney handling the case, declined to comment.

LaRouche's decision to appear "goes against all conservative legal advice," the thrust of which was: "Don't ever talk to the grand jury, but let them make their case," Anderson said, adding that "LaRouche doesn't do things the way other people do."

Anderson quoted LaRouche as saying after the grand jury session, " 'I'm not going to hide behind theoretical constitutional rights . . . . That's ridiculous. That's not the way I've ever done things.' "

The grand jury indicted LaRouche's associates on charges of trying to scuttle an investigation of alleged financial frauds by sending witnesses out of the country, burning and hiding documents, refusing to answer questions and harassing investigators. The panel is continuing that investigation.

Prosecutors have said that LaRouche orchestrated his associates' actions, but sources said LaRouche's defense is that he never took part in any obstruction, and never advised anyone to leave the country.

Anderson said he does not know exactly what was said in the grand jury, but described it as a "candid exchange."