A federal judge sentenced Atlanta rapper Gucci Mane, whose real name is Radric Davis, to 39 months in prison and said he may have to limit his traveling to perform for three years after he serves his sentence on a firearms charge.

Davis pleaded guilty in May to possession of a firearm by a convicted felon. The 39-month prison sentence was part of the binding agreement he reached with prosecutors. Davis has already spent 11 months in custody, which leaves him with 28 months remaining on his sentence. Had he gone to trial, Mane could have been sentenced to up to 10 years in prison.

Davis’ lawyers asked U.S. District Judge Steve Jones on Wednesday to recommend that the Bureau of Prisons put the rapper in a drug program and to house him in a facility on the West Coast, away from negative influences he has in Atlanta.

“He understands he has some work ahead of him and his goal is to bring resolution to this case and get back to performing,” said Drew Findling, Davis’ attorney. “He doesn’t want anything to distract him. He wants to do anything to get back to the work place and the work place is the stage.”

While on probation after he is released from prison, however, Davis will be allowed to leave the Northern District of Georgia no more than seven days a month unless he has his probation officer’s permission. Davis told the judge his tours usually lasted 14 to 15 days.

Jones lectured Davis about redirecting his life once he is released.

“You’re a young man, You have a full life before you. … I see a lot of famous people move outside the line,” said Jones.

And if he continues to break the law, Jones said, “you’re going to wake up one morning broke. You’re going to wake up one morning back in prison.”

According to the indictment, on Sept. 12, police caught Davis, a felon on probation, with a Taurus 45-caliber handgun and eight rounds of ammunition. Two days later, a friend concerned about the rapper's behavior also called Atlanta police.

About 1 a.m. Sept. 14, authorities found Davis walking near Moreland and East Confederate avenues, and Davis became “increasingly agitated with officers and began cursing and threatening them.”

The officers arrested Davis and discovered he was carrying a handgun and small amount of marijuana, police said at the time. The federal indictment claims he was in possession of a Glock 40-caliber handgun and 11 rounds of ammunition.

Assistant U.S. Attorney Kim Dammers said Davis had a “substantial criminal history” even before he was arrested in this case.

In April 2013 Davis was indicted for assault for allegedly hitting a soldier in the head with a champagne bottle at Harlem Nights club in downtown Atlanta. He pleaded not guilty.

Davis was convicted of battery in 2011 in DeKalb County and of aggravated assault in Fulton County in 2005.

In 2005, Davis was charged with murder in DeKalb County after shooting a Macon rapper he said attacked him. The charges were later dropped.

He also was charged with battery in 2008 in Henry County but the victims were apparently unwilling to testify so that case went nowhere, Dammers said in court.

Davis only spoke once during the hearing. He was subdued.

“I thank you and I definitely don’t want to withdraw my plea,” Davis told the judge after some discussions about counting the time he has been in jail awaiting resolution of the case against the 39-month sentence.

Jones said he had read some news accounts of Davis and his career and listened to his music to get an understanding of the man before he is sentenced.

“I don’t mean any disrespect,” said Jones, the judge who referred to himself several times as a Four Tops fan, referring to the 1960s Motown group. “But according to young people, my nieces and nephews, you are quite cool.”

Davis turned and waved at friends who had filled two rows in the courtroom before he was led out, his ankles in chains.