OAKLAND -- A half brother of convicted killer and former Your Black Muslim Bakery leader Yusuf Bey IV has been freed from jail after spending nearly four years in custody -- a term that exceeded the conditions of a plea bargain he agreed to in 2008.

Joshua Bey, 23, was the first of Bey IV's followers to strike a deal with prosecutors. It called for him to serve three years in prison in exchange for testifying against his half brother and three other men in the 2007 kidnapping of a mother and daughter and the torture of the daughter.

Joshua Bey had been in custody since Aug. 3, 2007, and while never sentenced to prison, he was released on his own recognizance from North County Jail in Oakland over the weekend because he has fulfilled the terms of his agreement.

The kidnapping and torture case against Bey IV and another alleged participant, Tamon Halfin, remains unresolved.

But Joshua Bey testified about the crime at Bey IV's triple-murder trial, which concluded June 9. In that case, the 25-year-old former bakery leader was convicted of three counts of first-degree murder for ordering the deaths of journalist Chauncey Bailey and two other men, Odell Roberson and Michael Wills, in summer 2007. Bey IV is to be sentenced July 8 to a mandatory term of life in prison without parole.

During the murder trial, Deputy District Attorney Melissa Krum used the torture case to show Bey IV was the unquestioned leader of the bakery's paramilitary like operations and that he was desperate for money to save the organization from bankruptcy liquidation.

Krum said in a message Monday that Joshua Bey still must testify against Bey IV and Halfin if the kidnapping and torture cases go to trial. Bey IV and Halfin are due in court June 24 on that case.

Joshua Bey testified last year against bakery member Richard Lewis in the torture and kidnapping, as did Yusuf Bey V, another of Joshua Bey's half brothers. Lewis was convicted and sentenced to life in prison without parole.

Joshua Bey caused a near fist fight between Bey family members when his surprise plea deal was reached on Feb. 2, 2008, and he testified at a preliminary hearing in the case. His mother, a woman identified in court records as Jane Doe 1, was a teenage rape victim of family patriarch Yusuf Bey.

Others confronted her outside the courtroom where Joshua Bey was testifying. Bailiffs separated them.

Reach investigative reporter Thomas Peele at tpeele@bayareanewsgrroup. Follow him at Twitter.com/thomas_peele.