Wiz Khalifa has been arrested for possession of marijuana in Texas.

TMZ reports the rapper was flying from El Paso to Dallas when the transportation security administration (TSA) stopped him. They are said to have discovered a “green leafy substance” during a check of his luggage and person before handing Wiz over to local police.

While marijuana isn’t illegal in all states, having the substance is against the law in Texas.

Wiz, who has son Sebastian with wife Amber Rose, has been posting on Twitter from behind bars.

“Free Trap Wiz” he wrote alongside a picture of the cell’s door, followed by a snap of him in a red hooded jumper captioned: “Jail Selfie”.

He continued to defend his actions, insinuating he plans to take things into his own hands once he is released.

“I wanna drop 28 Grams but they got me locced up. Soon as I get out, the tapes comin out (sic)” the 26-year-old added.

“They're tryna figure out how many grams I had. How ironic. (sic)”

Wiz has been open about his use of various substances in the past and it was only last month he told talk show host Chelsea Lately he smokes weed ahead of his gigs.

He also previously claimed he spends up to $10,000 a day on cannabis.