Yasiin Bey, the American rapper and actor previously known as Mos Def, has been ordered to leave South Africa because he allegedly overstayed the tourist visa he obtained in 2013.

The Department of Home Affairs told the BBC the 42-yer-old artist -- who was born Dante Smith -- must leave the country by the end of the month.

He reportedly was held at Cape Town International Airport on Thursday after trying to leave the country with "unrecognized papers" he described as a "world passport."

"Further investigation into the matter revealed that Mr. Smith's wife, mother and four children had overstayed and were sojourning in the country illegally," a statement by the Department of Home Affairs said.

Bey's film credits include "The Hitchhiker's Guide to the Galaxy," "Be Kind Rewind" and "The Italian Job."