Alleged Nightclub Shooter Beat Murder Rap Before Hollywood Shooting

1/21/2013 9:45 AM PST

The man accused of shooting and killing a clubgoer in Hollywood last weekend was accused of ANOTHER murder just a few months ago -- but the guy beat the rap, TMZ has learned.

22-year-old Robert Earl Thomas was arrested last July in connection with a murder that took place in 2009 in L.A. -- back when Thomas was just 19.

Thomas was charged with murder -- but law enforcement sources tell us, he was not the gunman in the case. We're told he was one of several people involved in the murder.

Thomas pled "not guilty" and spent 4 months in jail, but the murder charge was ultimately dropped due to lack of evidence. He was released in November.

Thomas is now accused of the murder TMZ captured on camera outside Empire nightclub in Hollywood last week. He was arrested Wednesday night at a friend's house in Las Vegas.

He is still in custody.