Dallas Mavericks point guard Raymond Felton pleaded guilty Wednesday in a New York gun case, taking a plea deal that involved admitting a felony but spares him jail.

Felton pleaded guilty to attempted criminal possession of a weapon and criminal possession of a firearm. He admitted he knowingly had a large-capacity ammunition magazine and a pistol without a license.

"Are those charges true?'' Manhattan state Supreme Court Justice Larry Stephen asked.

"Yes, sir,'' Felton said, later adding in a soft voice, "I apologize.''

He was immediately sentenced to 500 hours of community service and ordered to pay a $5,000 fine. Manhattan Assistant District Attorney Jonathan Rebold said Felton will be allowed to do the service outside New York.

If he complies, the case will be closed without jail time or probation.

Felton has said the Manhattan district attorney's office, which had outlined the agreement in court last month, was fair to him.

The criminal case arose last winter, as Felton grappled with the breakup of his marriage and navigated a struggling season with the New York Knicks. He was traded to Dallas last month, two days after his plea plan was announced.