A 17-year-old student who maintains that the FBI has been keeping tabs on him since the sixth grade says it all started when he wrote to the Soviet Union for information for an encyclopedia he was compiling.

Todd Patterson of North Haledon, N.J., wants his entire file turned over to him and the record expunged on the grounds that it violates his First Amendment right to free speech. On Monday, the American Civil Liberties Union filed lawsuit in federal court on behalf of the student.Patterson, now a junior at Don Bosco Preparatory School in Ramsey, apparently came to the attention of federal authorities in 1983 when he wrote 169 governments looking for information for his world encyclopedia, ACLU attorneys said.

In 1984, an FBI agent visited Patterson at home and over the years he has frequently received mail from the Soviet Union that shows signs of being opened in transit, that has been damaged or that has had the contents removed, lawyers said.

"We don't think they have a right to open people's mail, even to the Soviet Union," said Frank Askin, a Rutgers University Law School professor who is handling the case as a volunteer.

Last year, Patterson attempted to see his FBI file, filing a request under the Freedom of Information Act, Askin said. After months of denials and reviews, he received six pages of heavily censored material and a letter from Richard Huff, co-director of the Office of Information and Privacy, telling him the rest of the file was being withheld because of possible risk to national security.

Patterson, who would like to work for the State Department when he graduates from college, is anxious not to have any kind of file in existence that labels him a security risk, Askin said.

James Knights, a spokesman for the FBI's Newark office, said he could "neither confirm or deny" any investigation of Patterson. Asked if the FBI often kept tabs on high school students, he said he could not comment on the agency's "counterintelligence guidelines."