An ink expert who testified for the prosecution at the Martha Stewart trial was found not guilty Tuesday of repeatedly lying on the witness stand.

A federal jury in Manhattan deliberated about seven hours over two days before acquitting Secret Service scientist Larry F. Stewart -- who is not related to the businesswoman -- of two counts of perjury.

"Mr. Stewart, good luck to you," U.S. District Judge Denny Chin told Stewart. The scientist appeared to lose color in his face as the verdict was read, and hugged his lawyers when it was complete.

Stewart said outside court that the case had been "long, expensive and painful" and said it was difficult being on the other side of "a system I've worked for diligently for 25 years."

Stewart, of Bethesda, has been on administrative leave from the Secret Service since he was arrested in May. Asked whether he wanted his job back, he said: "Not that job. I don't want it."

Federal prosecutors accused Stewart, 48, of exaggerating the role he played in ink analysis testing of a stock worksheet that was used as evidence against Martha Stewart and her broker, Peter E. Bacanovic.

The pair were convicted in March of lying to investigators about why she sold stock in 2001. Martha Stewart, who is appealing her case, will nevertheless begin serving a five-month prison term this week.

The government contended that Susan Fortunato, who worked for Larry Stewart at the Secret Service, conducted the tests in the summer of 2002 and January 2004.

At trial, Fortunato bolstered the government case and testified that Stewart once confronted her after an office meeting and kissed her. She complained to her supervisors but later withdrew the claim.

Three members of the jury who spoke to reporters after delivering the not-guilty verdict said they doubted Fortunato's credibility as a witness.

"For most of us, it was the fact that she did have an ax to grind," said juror Judith Robinson Brodsky, an insurance broker who lives in Manhattan.

Jurors also said they focused on an instruction from the judge that, in order to find Stewart guilty, his testimony had to be "material" -- in other words, that it could have influenced the Martha Stewart jury.

Bacanovic was acquitted of a charge that he doctored the stock worksheet to reflect a cover story for why Martha Stewart sold ImClone Systems Inc. stock just before its share price plunged.

Regardless of the verdict, the allegation that a prosecution expert witness was accused of lying on the stand is expected to figure prominently in appeals by both Martha Stewart and Bacanovic.

Both were allowed to remain free while they appealed. Stewart decided instead to begin serving her five-month term, and must report by Friday to the minimum-security women's prison in rural Alderson, W.Va.

Federal prosecutors said all along they did not believe the perjury charges against Larry Stewart put the Martha Stewart verdict in question.

"I think we're on solid footing on that point," U.S. Attorney David N. Kelley said Tuesday after the verdict.

Brooke Morganstein, a spokeswoman for Martha Stewart, declined to comment on the verdict.

Larry F. Stewart, a Secret Service forensic scientist, was acquitted of lying on the stand about ink analysis tests.