A 21-year-old Northeast Washington woman was arrested yesterday after she tried to carry a loaded gun into the Superior Court building where 12 Hanad Muslims are being tried on murder and kidnaping charges.

Authorities said another woman was detected with a gun Monday and about 40 persons have been stopped with knives or similar objects in two days. None of the persons appeared to have any connection to the Hanafi trial, the authorities said.

About 10 a.m. yesterday Miranda Johnson, of 719 K St. NE, was searched by a D.C. government guard as she entered Building A of Superior Court at the entrace at 5th and F Streets NW. The guard found a .25 caliber automatic pistol under her armpit with a full clip containing seven rounds of ammunition, according to Lt. William H. Ladson, supervisor of the guard force in charge of court security.

Police said Johnson was charged with carrying a dangerous weapon and possession of marijuana. She is scheduled to be arraigned in Superior Court today. Police said Johnson told them she was coming to court because her boyfriend had been arrested Monday night for carrying a weapon.

Most of the persons who brought knives to the court had pocket knives, and many of them surrendered them voluntarily before going through a metal detector similar to those used at airports, Ladson said. However, two straight razors and an ice pick were confiscated, he said.

The metal detectors were placed at the Superior Court building yesterday, where the trial was moved from the Pension Building. The jury selection took place at the Pension Building, where a metal detector was also used to make security searches.