Mixed martial arts fighter Conor McGregor pleaded guilty on Thursday in a Brooklyn courthouse as part of a deal with prosecutors to resolve charges over an April melee at the Barclays Center arena.

McGregor, dressed in a dark navy suit, was stone-faced throughout the court proceeding. He will avoid prison as a result of his agreement, which calls for him to serve five days of community service, attend an anger management program and pay for the damages he caused.

Outside the courthouse, McGregor thanked prosecutors and the judge for letting him "move forward."

"I'd like to say to my friends, my family and my fans: Thank you for your support," he added. A small crowd of fans cheered as he headed for his car.

The 30-year-old brash Irish star had been charged with assault, criminal mischief and other crimes for his role in the brawl. He pleaded guilty to disorderly conduct, a violation, which will not result in a criminal record. The plea will have no effect on his immigration status or his ability to fight, according to his defense lawyer, Bruce Maffeo.

Video footage, which went viral, appeared to show McGregor and his entourage in an underground parking area smashing windows on a bus filled with Ultimate Fighting Championship fighters who were at the arena to publicize an upcoming UFC event.

Cian Cowley, another Irish fighter charged in the incident, also pleaded guilty on Thursday.

The UFC, the sport's premier organizing body, said one fighter was hit by a dolly thrown through a window, while another suffered a cut to his eye after the glass shattered.

At the time of the melee, McGregor was angry that the UFC had stripped him of the lightweight title, according to profanity-laced messages he posted on Twitter.

The UFC took away the title after McGregor decided not to defend it in favor of taking a highly lucrative boxing match against the undefeated Floyd Mayweather. Mayweather's pay-per-view victory garnered more than $600 million in revenues, making it the second-biggest bout of all time.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.