FORT LAUDERDALE, Fla. (AP) — A contrite Chad Johnson apologized Monday for disrespecting a judge when the former NFL star slapped his attorney on the backside in court last week, and his immediate release from jail was ordered.

Broward County Circuit Judge Kathleen McHugh accepted Johnson’s apology and cut his 30-day jail term for a probation violation to the seven days he had already served since the rear-swatting incident. Johnson, a flamboyant wide receiver formerly known as Chad Ochocinco, said in court that he’d had time to think about why his flippant attitude was wrong — especially in a domestic violence case.

“I just wanted to apologize for disrespecting the court last time,” said Johnson, wearing a tan jail jumpsuit with his hands shackled at the waist. “I apologize. I did have time to reflect on the mistakes I made in this courtroom.”

McHugh noted that in a previous hearing Johnson had put his arm around a female prosecutor’s shoulders, prompting the prosecutor to tell him twice not to touch her. The judge also pointed out that when Johnson head-butted his then-wife, Evelyn Lozada of the reality TV show “Basketball Wives,” she suffered a three-inch gash on her head that required eight stitches. The judge called those injuries horrific.

McHugh also said Johnson failed to appreciate “the gift of probation” after pleading no contest to battery in the altercation last August with Lozada, which prompted her to quickly file for divorce. Johnson, 35, was in court because he had failed to meet with his probation officer for three straight months.

“I find that’s an arrogant disregard for a court order,” the judge said.

McHugh ordered Johnson to perform 25 hours of community service and attend domestic violence counseling sessions twice a week during probation, and she extended his probation an extra three months through mid-October.

The attorney who had his backside slapped, Adam Swickle, said Johnson will fully comply with all probation conditions and hopes to resurrect his NFL career. The six-time Pro Bowler was cut by the Miami Dolphins after his arrest for battery; he played most of his 11 seasons with the Cincinnati Bengals followed by one year with the New England Patriots.

“He understands that this is the kind of situation that can derail a person’s career,” Swickle said. “We’re very confident he will do what he should do.”