ATLANTA (AP) — The rapper T.I. was arrested early Wednesday as he tried to enter his gated community outside Atlanta and was charged with disorderly conduct, public drunkenness and simple assault — but the artist’s lawyer called it a wrongful arrest.

Henry County Deputy Police Chief Mike Ireland said T.I. was arrested around 4:30 a.m. after he got into an argument with a security guard. Media reports say the Grammy-winning artist, whose real name is Clifford Harris, had lost his key and the guard wouldn’t let him into the community.

Ireland said T.I. and a friend were arrested. The rapper has been released on bail.

T.I.’s attorney, Steve Sadow, said in a statement that the rapper was “wrongfully arrested.” He claims the guard was asleep when his client arrived at the guardhouse and it took “some time to wake up the sleeping guard.”

Sadow said T.I. identified himself and sought entry, but the guard refused. The rapper contacted his wife Tameka “Tiny” Cottle, who confirmed that her husband should be allowed inside the community.

“The guard continued to refuse entry without justification,” Sadow said in a statement, referring to T.I. as Tip. “Words were exchanged and apparently the guard and/or a supervisor called the police. When the police arrived, they were not interested in hearing Tip’s side of the story and wrongfully chose to end the situation by arresting Tip.”

The rapper served about seven months in prison in 2009 after his arrest on federal gun charges.

He also spent about 10 months in federal prison on a probation violation in 2010 after he was arrested on drug charges in Los Angeles. The drug arrest violated his probation — he had been ordered not to commit a crime and not to illegally possess any controlled substances — and led to an 11-month prison sentence at an Arkansas prison.

T.I. is one of the biggest names in hip-hop, with multiple platinum-selling albums and singles, production credits and roles in films like “ATL” and “American Gangster.”