One of the the four men charged with the 2018 murder of rapper XXXTentacion has taken a plea deal and plans to testify against his other co-defendants.

On Friday (Aug. 12), Robert Allen accepted a plea deal in Broward County, Fla. court, XXL has confirmed through the Broward County State Attorney's Office. He is still looking at life in prison but is hoping to get a less time for cooperating. Allen's lawyer, Jim Lewis, spoke with the assembled media about the update in case.

"Mr. Allen entered a guilty plea this morning in the murder death of XXXTentacion," Lewis told NBC Miami. "He pleaded guilty to a lesser included offense of second-degree murder and robbery with a firearm. He still faces a life sentence. Obviously, we are hoping for better than that. But his sentence is deferred and it is likely he will be called as a witness in the case against the other three co-defendants."

"Mr. Allen's role was much less than the other three involved," Lewis continued. "It was always kind of contemplated that the State was looking to use him as a witness in the case. And finally we came to an agreement and plead to the agreement today … Again, his involvement was much less than the others. More of an accusatory after the fact than really part of the planning. Certainly never got out of the car, never had a gun, never shot anybody. And hopefully the judge and the State will take this into consideration."

The other three men charged in the case, Michael Boatwright, Dedrick Williams and Trayvon Newsome, face capitol murder. All four men are accused of being involved in XXXTentacion's death, which occurred at Riva Motorsports in Deerfield Beach, Fla. on June 18, 2018. According to witnesses, two men approached the rapper while he was sitting in his BMW. Words were exchanged, followed by gunfire. One of the men then reached into XXX's car and retrieved a bag before they fled.

Williams was arrested two days after the killing, while Boatwright and Allen were captured in the following weeks. Newsome was captured the following month. Boatwright, Newsome and Williams have pleaded not guilty.

See 44 of the Longest Prison Bids in Hip-Hop History

C-Murder, Max B, B.G. and more.