RICHMOND, JAN. 11 -- A federal appeals court upheld a ruling today that dismissed complaints filed against Virginia Attorney General Mary Sue Terry by six organizations affiliated with political extremist Lyndon H. LaRouche Jr.

However, a three-judge panel of the U.S. 4th Circuit Court of Appeals returned to the lower court the groups' complaint against a state trooper who was involved in a search of the LaRouche groups' Leesburg offices.

The organizations, including the Fusion Energy Foundation and the National Democratic Policy Committee, sought damages stemming from an October 1986 raid by federal and state authorities on LaRouche-linked operations.

The six groups contended they were not targets of the search and that any documents seized were taken in violation of their constitutional rights.

U.S. District Judge Richard L. Williams of Richmond ruled against the organizations after concluding that one state trooper named in the complaint did not participate in the search and that the other officer who was named seized only documents that were within the scope of the state warrant that was issued for the search.

Williams also denied the groups' request for an injunction against Terry and the director of the Virginia State Police because the documents in question were under federal, and not state, control.

The appeals panel upheld Williams except for the dismissal of the complaint against Trooper R.H. Perry III, who took part in a seizure of records at one of two buildings where the groups were located.

The appeals panel said the record of the case failed to describe details of how federal officers and Perry conducted the search. The panel also said counsel suggested that Perry "may have helped the federal officers seize items pursuant to the federal warrant which were not covered by the state warrant . . . . "

The panel returned the complaint against Perry to Williams to consider whether a state officer can lawfully seize items under the authority of a federal warrant in a joint federal-state search.

However, the appeals panel suggested that the lower court stay further action pending the outcome of criminal proceedings in federal court in Boston against some LaRouche associates.

LaRouche and several associates are on trial in federal court in Boston on charges of obstructing an FBI investigation of fund raising for his 1984 presidential campaign.

The Richmond ruling involves one of many motions filed by LaRouche group lawyers in a separate criminal case, in which Virginia authorities are charging LaRouche followers with fraud.