FAIRFAX, Va. -- A judge said yesterday that Fairfax County Commonwealth's Attorney Robert F. Horan Jr. can prosecute convicted sniper John Allen Muhammad in his second capital murder trial, rejecting a defense bid to bar the veteran prosecutor and his staff from trying Muhammad in the shooting death of FBI analyst Linda Franklin.

Muhammad's defense lawyers argued that Horan took the position at Lee Boyd Malvo's trial that the teenager fired the fatal shot killing Franklin on Oct. 14, 2002, and that Horan's current contention that Muhammad was a principal in the shooting was inconsistent with that. They said they may want to call Horan as a witness in Muhammad's trial, set for Oct. 4.

But Horan said there was nothing inconsistent in his position, which he said has always been that the convicted snipers were "peas in a pod" who acted as a team, with Muhammad serving as the spotter in Franklin's shooting. He said that when Muhammad acted as the spotter during the three-week sniper rampage in the Washington area, he told Malvo when the coast was clear to shoot.

"But that doesn't mean Mr. Muhammad was the big pea," Horan said.

Fairfax County Circuit Judge Jonathan C. Thacher rejected the defense request, saying that unless Horan offers a different version of events than he did in the first trial, he has nothing to rule on.

Muhammad, 43, and Malvo, 19, are accused of killing 10 people and wounding three more in the Washington area in fall 2002. Both were convicted of capital murder in separate trials last year. Malvo was sentenced to life without the possibility of parole in Franklin's death. Muhammad was sentenced to die for fatally shooting Gaithersburg engineer Dean H. Meyers on Oct. 9, 2002, while he pumped gas near Manassas, Va., a verdict and sentence that he is appealing.

Horan has described the coming trial as insurance that Muhammad will be held responsible for sniper crimes should he win his appeal.

Yesterday, during a recess in the daylong pretrial hearing, a barefoot Muhammad slipped out of the chain around his waist that tethered his handcuffs close to his midsection, and walked into the courtroom with the waist chain in front of him. A deputy notified the judge of a security breach, and at Thacher's order Muhammad was removed from the courtroom. When he was brought back in, the waist chain was gone. But instead of three deputies hovering over him, he had four, and the handcuffs and leg shackles remained on him.

"This is the one and only security violation I am going to tolerate," Thacher told the death row inmate.

But after Muhammad spoke with his lawyers and after a short bench conference, defense lawyer Peter D. Greenspun said, "Mr. Muhammad would describe the circumstances differently." However, he declined to elaborate.

"I would not call it an escape attempt. To me, it was more of a look-what-I-did," Second Lt. Tony Shobe, spokesman for the Fairfax County Sheriff's Office, said afterward. He said Muhammad had wiggled the chain down and stepped out of it.

Shobe said the Sheriff's Office generally makes defendants wear shoes in the carpeted courtroom, but decided against making an issue out of it yesterday.

Also yesterday, a defense lawyer for Malvo said Spotsylvania County prosecutors had struck a deal with his client.

"We've spoken with the prosecutor," said Michael S. Arif, one of Malvo's lead attorneys. "We've accepted the offer."

He said no pleas have been entered, and he would not provide details about the arrangement.

Law enforcement officials say Malvo fatally shot Kenneth H. Bridges at a gas station Oct. 11, 2002, and wounded Caroline Seawell, now 45, in a craft store parking lot seven days earlier.

In other defense motions yesterday, Thacher refused to allow the defense to hire a jury consultant to help gauge community sentiment so the defense could decide whether it wants to ask that the trial be moved. However, he said the defense was free to gather information on its own and present it.

Thacher also refused to dismiss the indictments, which charge Muhammad with murder as part of an act of terrorism and committing multiple murders. The judge set the next pretrial hearings for Aug. 30.

Sun staff writer Liz F. Kay contributed to this article.