A Lorton prison inmate testified yesterday that he went with a member of a Washington area Muslim group to purchase "commando type" arms at an Alexandria gun shop because "it had the type of weapons we were looking for."

The controversial testimony of Al F. Hunter Jr., who is serving a six- to 18-year sentence for armed burglary, came yesterday at the trial of 28-year old Jimmy F. McEachern in U.S. District Court in Alexandria. McEachern, a Washington messenger also known as Yusuf Abdul Haseeb, is charged with four counts of making false statements to buy firearms.

Federal prosecutors argued that McEachern used an out-of-date Virginia driver's license to make weapons purchases at the Potomac Arms Corporation in Alexandria in 1979. Assistant U.S. Attorney Nash W. Schott said that McEachern obtained a .22-caliber rifle, a .45-caliber semiautomatic rifle, another semiautomatic rifle, and two .38-caliber revolvers with the liecnse while he was either a D.C. or Maryland resident.

If convicted on all four counts, McEachern could face a maximum sentence of a $20,000 fine and 20 years in a U.S. penitentiary.

His attorney, Joe Dyer, conceded that McEachern purchased the weapons but said he did so for protection of a Muslim group that then worshipped at the small house in Forestville. Dyer said that his client intended to deceive no one in presenting "a perfectly valid driver's license."

Dyer also attacked Hunter, the prosecution's key witness, calling him as a "felon extraordinaire" who, the lawyer said, testified only after the government granted him immunity from prosecution for five Maryland bank robberies. "Doesn't it frighten you just a little bit when you make a mistake on a form and the entire resouces of the United States come down on you?" Dyer asked the jury.

The case, which federal prosecution say illustrates the ease of purchasing guns in Virginia, went to the jury yesterday afternoon after more than seven hours of testimony. The jury failed to reach a verdict yesterday and is scheduled to resume deliberations this morning.