Soulja Boy can breathe a sigh of relief after reaching a plea deal in his 2016 felony gun case.

As previously reported, SB allegedly violated his probation when cops discovered a gun in his Hollywood Hills home in mid-December. He was already on two years probation from an incident in 2014 when he was charged possession of a loaded gun.

The December charges were reportedly dropped a few days later, but in January prosecutor decided to go forward with felony gun possession charges for the mini-Draco AR-15 police found at his home, which is illegal for anyone to have in the state of California.

Now, according TMZ, the rapper has cut a deal to avoid jail time. SB pled no contest and was sentenced to five years of probation plus 240 hours of community service. The stipulations also prohibit Big Soulja from possessing any type of firearm during that period, even fake guns.

The Atlanta rapper will be able to travel for work-related events, but must get any trips cleared with his probation officer.

Now that Soulja's proposed scuffle with Chris Brown is off, the "Crank Dat" rapper has been making the news for beefing with his own family. Last month, he was called out by his own brother and mother and accused of abandoning his kinfolk. He later threatened to expose his mom dukes saying she only calls when she has a money issue.

The drama continues.

See Photos of Soulja Boy's Different Looks Over the Years