UPDATE: Lil Za booked for even more charges while still in jail!

Sources tell TMZ Za was minutes from posting bail and getting released from custody after getting busted for drug possession at Bieber's house this morning -- and then for some reason he flipped out and smashed a phone in the jailhouse.

We're told Za was almost immediately re-booked for vandalism.

Watch Lil Za getting out of jail after making bail:


(TMZ) - Justin Bieber's BFF Lil Za was arrested for drug possession at the singer's home -- during an early Tuesday morning raid stemming from the Bieber egg attack on his neighbor, TMZ reports.

Officials Za was carrying cocaine at the time of his arrest and will be charged with a felony.

Za is a rapper who once lived at Bieber's Calabasas home ... and he's been tight with JB for years.

See video of his arrest here: