ALBANY, N.Y. (AP) -- Platinum-selling rapper Ja Rule left an upstate New York prison Thursday morning after serving most of his two-year sentence for illegal gun possession and headed straight into federal custody in a tax case.

U.S. Marshals escorted the 36-year-old musician out of Mid-State Correctional Facility at 9:30 a.m. He was being held at the Oneida County Jail in central New York as he awaited word from the Federal Bureau of Prisons about where he'll serve time in the tax case.

The rapper, who had been in protective custody because of his celebrity, has some time remaining on a 28-month sentence for tax evasion that ran concurrently.

Ja Rule, whose real name is Jeffrey Atkins, may have less than six months left and may be eligible for a halfway house, defense attorney Stacey Richman said. Back taxes are one of the main reasons he wants to get back to work, she said.

"Many people are looking forward to experiencing his talent again," Richman said.

Assistant U.S. Attorney Joseph Mack said Atkins owed the IRS $1.1 million and didn't immediately know what if any had been paid. Once out of custody, Atkins also faces a year of supervised release, he said.

Ja Rule scored a Grammy Award nomination in 2002 for the best rap album with "Pain is Love." He also has appeared in movies, including "The Fast and the Furious" in 2001 and "Scary Movie 3" in 2003.

Ja Rule, who went to the prison in Marcy in June 2011, got out at his earliest release date, state correction spokeswoman Linda Foglia said. He had two misbehavior reports for unauthorized phone calls in February 2012 and had work assignments on lawn and grounds crews and participated in education programs, she said.

In the gun case, New York City police said they found a loaded .40-caliber semi-automatic gun in a rear door of Ja Rule's $250,000 luxury car after it was stopped for speeding. He pleaded guilty in 2010.

In March 2011 he admitted in federal court that he failed to pay taxes on more than $3 million he earned between 2004 and 2006 while he lived in Saddle River, N.J.

Story continues

"I in no way attempted to deceive the government or do anything illegal," he told the judge. "I was a young man who made a lot of money — I'm getting a little choked up — I didn't know how to deal with these finances, and I didn't have people to guide me, so I made mistakes."

Richman said Ja Rule is looking forward to his daughter's graduation.

"He's a devoted father," she said.