BOSTON (AP) _ The Church of Scientology in Boston doesn't have to show the Internal Revenue Service thousands of requested documents that include financial and membership information, a federal appeals court said.

The church called it the first major test of a 1984 law restricting the agency's right to examine church documents.

Judge Stephen Breyer, writing for the 1st U.S. Circuit Court of Appeals, agreed with a June 1990 lower court decision that the IRS failed to show about 200,000 pages of documents requested were ''necessary'' or ''relevant'' to IRS review of the church's tax-exempt status.

''We're ecstatic,'' church spokesman David Aden said Wednesday. ''We think it's fantastic, not only for churches here, but for churches in general. ... It lets the IRS know that they do not have a right to get involved in the wholesale harassment of churches.''

The IRS asked the church to hand over documents covering 1985 through 1987, Aden said. The documents requested ranged from bookkeeping records to brochures sent to the 1,000 members of the church in the Boston area.

''It was just about everything but the minister's notes on counseling sessions with parishioners,'' Aden said. ''Why is the IRS interested in that?''

Bob Kobel, an IRS spokesman in Brooklyn, N.Y., said the agency can't disclose the reasons the agency requested the documents.

Aden said much of the requested material would have violated church members' privacy. ''Some of it, by its nature, would have had members names' on it and (revealed) their relationship with the church,'' Aden said.

Officials with the IRS had not yet seen the May 29 appeals decision and were uncertain whether it would be challenged, said Don Roberts, an IRS spokesman in Washington.

Scientology, founded in 1954, describes itself as non-denominational and claims 6 million followers worldwide.