EL PASO, Texas (AP) _ One of more than 300 Hispanic FBI agents who have joined a racial discrimination lawsuit says agency careers were stymied by a network of Mormon agents that included the disgraced Richard Miller.

Sammy Martinez, a special agent in New York, testified Wednesday that when he worked in the Mexico City office in 1986 he was discriminated against for racial and religious reasons by his boss, now a high-ranking FBI official.

Martinez said he was the only Hispanic and non-Mormon in the Mexico City office.

''I know there was a contract on me,'' Martinez told U.S. District Judge Lucius Bunton, explaining that in FBI jargon, a contract means ''someone's out to get you'' to sabotage your career.

In his testimony, Martinez charged his Mexico City boss, John Walser, of falsely accusing him of wrongdoing as a pretext to get Martinez transferred out of the office. Martinez said the incident would not have happened were he non-Hispanic or Mormon.

Walser, who is now an executive assistant director in Washington, did not return a phone call Wednesday from The Associated Press.

Defense attorney Alan Ferber noted that Walser has adopted four Mexican children and has a Hispanic brother-in-law.

The 311 agents who have joined the lawsuit contend the FBI discriminates against Hispanics in hiring, promoting, assignments and disciplining. They want damages and a change in the way the FBI promotes and handles discrimination complaints.

About 400 of the FBI's 9,000 special agents are Hispanic. Every agent who has testified since the trial began Monday has said he fears retaliation for appearing in court.

The lawsuit was filed in January 1987 by Bernardo ''Matt'' Perez, assistant special agent in charge at the El Paso office. Perez was the No. 2 man in Los Angeles for two years before his El Paso transfer in 1984.

Perez has contended that Richard Bretzing, special agent in charge of the Los Angeles office, criticized his performance as an administrator because of racial prejudice. Bretzing in the past has declined comment.

Perez later testified in the Los Angeles espionage trial of former FBI agent Richard Miller that he told Bretzing he should fire Miller for incompetence. Miller was convicted of espionage.

Bretzing and Miller are both Mormons, and the Bretzing-Perez fight led to charges of a ''Mormon Mafia'' in the Los Angeles office.

Martinez said after his testimony that about 50 of 450 agents in Los Angeles are Mormons.

Because most Mormon men serve as missionaries in their younger years, ''a lot of Mormons come into the bureau because of language ability,'' Martinez said. ''They're recruited, supported and move up the career ladder because of the clique.''

Testimony is expected to last two weeks.