Boosie Badazz is a free man after posting a $100K bond in his federal gun case Friday night ... and we caught him happy as a clam as he left a California lockup.
The rapper was photographed seated in the backseat of an SUV following his Friday night release from Metropolitan Correctional Center in San Diego -- and BB was clearly elated, smiling from ear to ear.
Check out the snapshot we obtained ... Boosie's just beaming as he rides away with his chauffer.
And he has every reason to celebrate after winning several court battles against prosecutors, who wanted to keep him behind bars for the duration of his gun case. Prosecutors filed motions to deny his bond -- but two federal judges ruled in favor of Boosie, paving the way for his release from jail.
TMZ broke the story ... Boosie was arrested by Alcohol, Tobacco and Firearms agents and charged in an indictment with being a felon in possession of a gun. Police initially arrested Boosie in early May after a traffic stop revealed he allegedly had two guns inside the SUV he was riding in.
State prosecutors dropped their case the same day ATF busted Boosie at a San Diego courthouse and charged him with essentially the same offense but on a federal level.
His attorney, Meghan Blanco, tells TMZ ... Boosie is innocent and plans to get the fed case dismissed.