A pat on his attorney's behind cost Chad Johnson 30 days in jail Monday.

Johnson, a former Miami Dolphin's wide receiver, was in court Monday on a probation violation charge and had worked out a plea deal with prosecutors that would have kept him out of jail.

Broward Circuit Judge Kathleen McHugh, however, rejected the plea deal after Johnson playfully patted his lawyer, Adam Swickle, during the proceedings.

People in court laughed, but the judge was not amused.

"Mr. Johnson, I don't know that you're taking this whole thing seriously," McHugh said. "I'm not going to accept these plea negotiations. This isn't a joke."

After a 15 minute break, Johnson apologized: "I had no intent to make this a joke. It's not funny."

Johnson told the judge: "My life is in a shambles right now, and I try my best to laugh and to keep a smile on my face."

Johnson pleaded guilty to violating his probation in a 2012 domestic violence case, throwing himself at McHugh's mercy.

McHugh sentenced him to 30 days in the Broward County Jail with credit for time served and extended his probation from Sept. 21 to Dec. 21.

McHugh also ordered Johnson to perform 25 hours of community service and to undergo two counseling sessions per week.

All of those conditions were part of the original plea negotiation, except for the jail time.

Johnson was immediately handcuffed and taken into custody.

Johnson, 35, pleaded no contest last year to a battery charge after his wife, reality TV star Evelyn Lozada, accused him of head-butting her during an argument in their Davie home last August. The charge signaled the end of their 11-week marriage.