Mos Def was arrested at Cape Town International Airport for trying to exit South Africa on an illegal “world passport” document.

The rapper-actor has 14 days to leave the country for violating local immigration laws, according to Mayihlome Tshwete, spokesman for the South African Department of Home Affairs.

Def, who goes by the name Yasiin Bey and whose birth name is Dante Terrell Smith, appeared in a South African court after he was arrested. He was joined by his family members who were also in the country without a permit.

The 42-year-old entered the country on an American passport in 2013 and overstayed his visitor’s permit by 2014. He presented an unrecognized travel document when trying to leave the country.

“Mr Smith came into SA with a legitimate US passport but since overstayed his visitors permit,” tweeted Tshwete. “Mr Smith was departing SA using a ‘World Passport’, SA does not recognise a ‘World Passport.'”

Per the court order, the Brooklyn-bred MC is banned from South Africa for five years, but may appeal to officials for leniency. He has lived in Cape Town since May 2013.