An Alameda County judge reluctantly dismissed all charges Tuesday against a man accused of beating two elderly Berkeley men - both of whom later died - on the grounds that the defense wasn't done cross-examining one of the victims at the time of his death.

Jahton Green, 21, is expected to be released from Santa Rita Jail in Dublin, where he was being held on charges of robbery and elder abuse causing great bodily injury in the January attacks on Robert Whitman and Tchang Hoang at their Berkeley homes.

Whitman, 78, died May 1 of bleeding in the brain. However, an autopsy by the Alameda County coroner could not confirm that his death had been caused by the attack Jan. 10, when Green allegedly beat and robbed Whitman of his wallet outside his home on the 1300 block of Arch Street in North Berkeley.

Whitman was left in a pool of blood, suffering from a broken hip and femur, head injuries and hearing loss.

Hoang died six months later in his native China, and his relatives said they didn't want an autopsy performed, said Eileen McAndrew, a senior deputy district attorney who prosecutes elder abuse cases.

Whitman, who identified Green as his attacker, died the week he was due back in court to continue being cross-examined by Green's attorney during a preliminary hearing, McAndrew said Tuesday.

At a hearing Monday in Oakland, the defense argued that Whitman's testimony was incomplete and therefore inadmissible at his trial, which was to have started this week. Judge Leo Dorado agreed Tuesday, saying that although "this isn't fair and this isn't just," the law compelled him throw out Whitman's testimony.

That ruling forced prosecutors to dismiss their case against Green, although he remains under investigation, McAndrew said.

"Mr. Whitman's testimony was the glue that held this case together," McAndrew said. "And unfortunately, he was very, very frail."

Green's attorney, Assistant Public Defender Mark Smallen, said Tuesday, "We are very pleased with Judge Dorado's decision, which was correct and compelled by law. We are very happy with the result because Mr. Green has always maintained his factual innocence in this matter."

Although McAndrew argued that Whitman's testimony could still be used, she said she respected the judge's decision.

Green's impending release is "very distressing," she said, calling him "a predator attacking elders in Berkeley." Still, she added, "I have an ethical obligation. If I can't go forward on a case, it is my duty and responsibility to dismiss it."

Whitman's widow, Frances, 78, said of the dismissal of charges, "It's mystifying to me." She said she was convinced the attack on her husband of 54 years had hastened his death.

"This guy is obviously into this elder thing and has gotten away with it," she said.