This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Mos Def, the hip hop recording artist and actor, learned that a “World Passport” does not make him a citizen of the world — especially when it comes to South African officials.

Mos Def, who now goes by the name Yasiin Bey and whose birth name is Dante Terrell Smith, was arrested at Cape Town International Airport for trying to leave the country on an illegal “World Passport” document, Mayihlome Tshwete, spokesman for the South African Department of Home Affairs, told CNN.

Bey appeared in court on Friday.

“The Department Of Home Affairs has given Mr Smith and his family 14 days to leave the republic,” tweeted Tshwete.

Brooklyn-born Smith, 42, and his family had been living in South Africa “without the necessary permits,” and they were detained for using illegal travel documents as they were leaving the country,Tshwete tweeted.

Smith entered South Africa on a legitimate U.S. passport, but he overstayed his visitor’s permit, Tshwete said. He tried to leave using a “World Passport,” a dubious document that can be printed off of the Internet.

The name used on the passport was Yasiin Bey.

“This is a tricky case,” said Tshwete, because the person would normally be deported to his or her home country. However, Tshwete says that Smith has renounced his American citizenship.

The artist has had trouble re-entering the United States while living in South Africa, canceling a 2014 tour because of U.S. immigration issues, according to the New York Daily News.

Smith is known for his thoughtful, consciousness-raising hip hop lyrics but was better known for his acting. He appeared on broadway in the Pulitzer Prize-winning “Topdog/Underdog” and in several films, including “Monster’s Ball,” “Brown Sugar” and two films with the late Alan Rickman: “Something the Lord Made” and “The Hitchhiker’s Guide to the Galaxy.”

CNN’s Brent Swails and David McKenzie contributed to this story from Johannesburg.

By Katia Hetter