A judge in Virginia ordered yesterday that death row inmate John Allen Muhammad be moved to Maryland, where he faces a second trial in the 2002 Washington-area sniper attacks.

His defense lawyer said it is a waste of millions of dollars to try Muhammad again, but Maryland prosecutors insist the trial won't be costly and say the families of victims in this state deserve their day in court.

"Obviously, I have a moral and legal obligation to prosecute those accused of committing murders in my community," said Montgomery County State's Attorney Douglas F. Gansler.

Noting security concerns, authorities would not disclose when they expect to transfer Muhammad, 44, to the Montgomery County Correctional Facility near Clarksburg.

"Virginia authorities have not given us a time yet, but I'd like to see it done as soon as possible," Montgomery County Sheriff Raymond M. Kight said late yesterday.

The county facility already houses Lee Boyd Malvo, 20, Muhammad's co-defendant in the sniper shootings. Malvo also faces a second trial in Maryland.

Ten people were killed and three others wounded during the shootings in Maryland's Washington suburbs, Virginia and the District of Columbia.

Muhammad ended up on death row after his conviction for killing one of the Virginia victims; Malvo, who was 17 at the time, received a life sentence for killing another.

Both face a trial in Maryland for the shooting deaths of six others.

Gansler said he intends to seek the death penalty for Muhammad.

Malvo, although charged as an adult, is not eligible for the death penalty because he was younger than 18 at the time of the crime.

Gansler said a trial for the two could get under way before the end of this year.

"The families of the victims have waited a long time for their day in court," the prosecutor said.

Gansler said that convictions in Maryland would serve as insurance in case Muhammad or Malvo was successful with appeals in Virginia.

But Peter Greenspun, a defense lawyer for Muhammad, said it makes little sense to prosecute him again in Maryland.

"The ultimate punishment has been imposed in Virginia," Greenspun said. "Why ... the people of Montgomery County would want to go through the horrible ordeal of this trial to obtain the same results is beyond me."

Greenspun said that it cost more than $4 million to prosecute Muhammad and Malvo in Virginia and suggested that similar costs would be incurred in Maryland.

Gansler described those estimates as "patently absurd," and said that costs would be no different than for any other criminal case.

"We're just doing our jobs," he said.

Vickie Snider of Rockville, whose brother, Sonny Buchanan, was killed in the sniper attacks, said that Muhammad and Malvo should have been tried first in Maryland, rather than Virginia, because most of the victims were killed in Maryland and the two were caught in Maryland.

"They should stand trial for the six people they killed here," she said.

Snider attended the trials of the two in Virginia and said she plans to be at their trials in Maryland.

"The trials are going to be difficult, I won't deny that," she said.

Under an agreement between Maryland and Virginia, Muhammad and Malvo will be returned to Virginia to serve out their sentences after their trials.

Louisiana officials have said they still plan to try Malvo and Muhammad for a killing in Baton Rouge, and Alabama intends to prosecute them in the killing of a liquor store manager in 2002.