KEITH SHIMADA / Invision/AP 1 / 6
KEITH SHIMADA / Invision/AP 1 / 6

Katt Williams was briefly detained by police in California on Thursday after he was caught carrying marijuana.

RELATED: See which stars had trouble with the law in 2012

Williams has been arrested on multiple occasions in the past few weeks over allegations including harassment, assault and reckless driving, but his latest incident was less serious.

Williams was approached by cops after parking his car in West Hollywood, and was found to be in possession of a small amount of weed and an empty magazine for a .45 caliber gun.

Officers initially confiscated the items, but they were forced to hand them back to the star after he produced his medical marijuana card, which permits him to carry small amounts of the drug. He also proved that he had not fallen foul of gun laws by producing a permit for his weapon.

RELATED: Who had trouble with the law last year?

Williams, who had been waiting for his rap mogul pal Marion 'Suge' Knight, was subsequently released, but he wasn't let off the hook completely -- he was cited for parking too close to a fire hydrant.

Knight arrived on the scene as the comedian was being ticketed and he too was handed a citation for outstanding traffic warrants, according to

RELATED: See what other celebs have been up to this week