NEW YORK — Ja Rule reached a plea deal with prosecutors in a Manhattan courtroom on Monday (December 13) that will see the rapper serve two years in prison. The charges stem from a gun bust in July 2007, when both Ja and Lil Wayne were arrested separately following a concert performance.

The Murder Inc. star pleaded guilty to attempted criminal possession of a weapon, a class D felony in the second degree.

"Minor setback for a major comeback," Ja tweeted after reaching the deal.

Ja Rule is expected to be sentenced in February, following a court appearance that same month to report his progress to the judge.

The case originated just over three years ago, when Ja Rule joined Lil Wayne at Manhattan's Beacon Theatre to perform with the Cash Money superstar, who was headlining his first New York City bill.

After the concert, both rappers, in separate instances, were pulled over in their vehicles by the New York Police Department. Both were subsequently charged with illegal possession of a firearm; Lil Wayne was also brought up on drug charges.

In Ja Rule's case, the rapper was one of three men in his car to be charged; all three were arraigned on the same charges. Police said they found a loaded semiautomatic weapon in the rear door of his car. If the Queens native had gone to trial and been found guilty, he could have faced up to seven years behind bars. Now, having reached a plea agreement, he'll likely serve 16 months in prison, followed by a year and a half of post-prison supervision.

Last year, Lil Wayne reached a plea deal in his case, and in March of this year, he turned himself in to begin his one-year sentence. Just last month, the New Orleans MC completed his sentence and is currently on probation for an unrelated incident in Arizona.