A volunteer Maryland election worker touched off a frenzied legal effort in Montgomery County yesterday after he refused to return a touch-screen voting machine, telling state election officials he intended to let an expert hired by CBS News examine it.

Stan Boyd, 63, a retired teacher, said he was giving CBS access to the machine because he believed it might have malfunctioned during a weekend demonstration with Sen. Barbara A. Mikulski (D-Md.), a view the senator does not share, according to a spokesman.

In a Montgomery court yesterday, the county election board argued that the machine is a "demonstration unit" and that testing by the news organization could wrongly undermine confidence in the machines that are set to be used in November.

A judge ordered Boyd late yesterday to surrender the machine. But by then, Boyd said later, the "independent expert" had examined it. The machine was back in the hands of election officials last night.

Maryland's elections administrator, Linda H. Lamone, said she asked county election officials to ask Montgomery prosecutors to consider filing criminal charges against Boyd.

"This man has stolen the voting unit," Lamone said before the case was resolved. "He's refused to return it."

Meanwhile, Maryland's highest court yesterday rejected a challenge to the touch-screen voting machines. The Court of Appeals, affirming a lower court ruling, said it would explain its decision in a forthcoming opinion.

The machines, manufactured by Diebold Election Systems, were used in four counties in 2002, including Prince George's and Montgomery, and in most jurisdictions across the state in the March primary. Lamone and critics of the machines have disagreed over the extent of problems that surfaced during the primary.

In November, the machines are slated to be used in every state jurisdiction but Baltimore, which will continue using bulkier electronic machines it purchased in 1996.

The events that led to Boyd's appearance in Montgomery Circuit Court yesterday were set in motion Sunday at the Takoma Park Folk Festival. Mikulski, out campaigning, came across Boyd's demonstration of the Diebold machine and decided to give it a whirl.

Mikulski spokesman Michael Morrill said that as the senator touched the screen to vote on one sample referendum question, she "apparently brushed" the question below it, highlighting "yes." She corrected the vote by touching "yes" again and then touching "no," which was the position she intended to take on the mock question. Her vote registered properly.

Morrill said that though the experience "reinforces the idea that there needs to be a paper trail," the senator does not believe the machine malfunctioned.

Monday, however, the Baltimore Sun reported that Mikulski had seen firsthand the "potential glitches that haunt" the state's voting system. The paper quoted Boyd as saying that Mikulski "can see for herself that the machine does not work right."

The county election board called Boyd that morning, demanding that he immediately return the demo machine, Boyd said.

He agreed, at first.

Then, Boyd said yesterday, the CBS News program "60 Minutes" called, telling him it wanted to send an expert to test the machine. Boyd decided to keep the machine until Thursday, the day he said he had agreed to return it originally.

Boyd said the board was persistent in its effort to recover the machine. He said the election officials called repeatedly and, when he was not home, tried to persuade his 15-year-old daughter to help them search for the 55-pound machine.

"I think when you get contacted nine times in one day, there's a lot of concern," he said.

The attorney for the election board, Kevin Karpinski, said in court that Boyd gave varying accounts of his whereabouts during the day. At one point, Karpinski said, Boyd told them he was headed to Dulles International Airport because his son was ill, and later told them he was at Baltimore Washington International Airport.

Circuit Court Judge D. Warren Donohue ordered at 3:20 p.m. that Boyd hand over the machine, which was then at the home of the lead plaintiff in the failed appellate challenge.

Boyd said the CBS expert had by then examined the machine as thoroughly as Boyd would allow. "This was all they could do without somehow endangering the machine" -- without taking it apart or rendering it inoperable, he said, adding, "They could not do more."

A spokesman for "60 Minutes" did not return a phone call seeking a comment. It was unclear what the program's examination found.

Joe Torre, Maryland's director of procurement and voting systems, shows how to use a touch-screen voting machine during a news conference.