A federal judge yesterday ignored a homosexual sailor's plea that he stole top secret documents from the Pentagon "to prove . . . I could be a man and still be gay" and sentenced him to eight years in prison for espionage.

U.S. District Judge Albert V. Bryan Jr. told the sailor has action smuggling classified reports out of a sensitive CIA-run office constituted an "extremely serious" offense.

A lawyer for Lee Eugene Madsen, told 24-year old Navy petty officer, told Bryan his client was a "naive individual" who had sold the documents to an undercover FBI agent in hopes of entrapping the purchaser and becoming famous. "I want to be a hero," lawyer J. Frederick Sinclair said, quoting a statement Madsen gave a court officer.

The young sailor believed he was selling the material to organized crime figures dealing in narcotics, his lawyer said. Madsen told a probation officer he "wanted all the glory and credit" for causing the arrent of the people with whom was dealing, Sinclair said.

By such an act Madsen said he "wanted to prove to myself that I could be a man and still be gay," his lawyer said.

But bryan said he had granted the sailor all the leniency he could when he dismissed 10 counts in the espionage indictment against him in return for a guilty plea on one remaining count. Madsen, assigned to the CIA-run Strategic Warning Staff, could have received 10 years in prison and a fine of $10,000 for his plea.

"You're never pleased when a client goes to jail," Sinclair said after the sentencing in an Alexandria courtroom. "But I expected Madsen to receive the full 10 years, so I'm pleased he only got eight years."

When Madsen was arrested Aug. 14, intelligence officials expressed concern over the ease with which he took sensitive documents from the security-conscious Pentagon. On one occasion he allegedly took a top-secret document titled, "U.S.S.R./Warsaw Pact General Indicator List," and "tucked it under his vest and down his pants" before walking out of the Pentagon, according to court papers.

FBI agent William Chapin said in court papers he was told by Madsen that he had stolen other documents in a similar manner "for his scrapbook."

None of the 22 classified documents Madsen was accused of taking supposedly went to foreign agents, according to the FBI. Instead, Madsen was accused of selling a group of the papers to an undercover agent for $700.

Bryan yesterday rejected Sinclair's request that Madsen, a professional homosexual, be placed in a prison designed for youths in which he could receive psychological counseling. The judge said he did not believe the sailor should be sentenced to such a facility and ordered him to begin serving his sentence at a federal penitentiary in Lewisburg, Ky.

A native of Roswell, N.M., Madsen was within two months of his Navy discharge when he was arrested.