An unruly American Airlines passenger was tased 10 times and removed from the aircraft after he allegedly groped a woman passenger. A video of the incident was shared on social media and quickly went viral.

The incident took place Sunday during a flight from Miami to Chicago. American Airlines said in a statement that a "disagreement" between two passengers erupted while Flight 2446 was still at the gate at Miami International Airport. The man -- identified as 28-year-old Jacob Garcia of Chicago -- touched a female passenger inappropriately without her permission, according to the arrest affidavit.

The police report said Garcia was moved to another seat following the incident with the female passenger, but he started to hurl racial slurs at her and her boyfriend.

"What was going through my mind was: this guy is an idiot, and I hope I don't get caught up in the madness," passenger Adisak Pochanayon told ABC News, adding: "At that point, it should have just been over with and called it a day. But the guy made that racial slur on the way back to his seat."

When flight attendants asked Garcia to get off the plane, he refused. The Miami-Dade police arrived to remove Garcia from the plane, but he resisted the officers and locked his legs around a seat. An officer was forced to tase Garcia as police struggled to get him off the plane. Police said Garcia was tased 10 times "due to Mr. Garcia's actions and the close quarters of the engagement, Officer Desorches was unable to holster his ECW (Electronic Control Weapon) which caused the number of cycles."

Garcia was charged with battery, depriving an officer of means of protection, disorderly conduct, resisting an officer and criminal mischief and was held on a bond of $6,000.

Below is the full statement from American Airlines:

On Sunday evening, a disagreement occurred between two passengers on American Airlines flight 2446 from Miami to Chicago O'Hare. The aircraft was still at the gate in Miami, and the instigating passenger was asked by our Miami team members to deplane and he refused. In accordance with our procedures, American began the process of deplaning the entire aircraft. During that process, a physical altercation between the same two passengers took place. Once law enforcement was on the aircraft, the passenger then became combative with the officers from the Miami-Dade Police Department. The same passenger was subsequently arrested by law enforcement. We will cooperate with the Miami-Dade Police Department on this matter. The flight, which was scheduled to depart at 9:30 p.m. ET, departed at 10:34 p.m. ET with all remaining passengers. We thank our crews and airport customer service team for their excellent work in this situation.

American airlines
An American Airlines plane takes off from Los Los Angeles International airport (LAX) in Los Angeles, California, March 28, 2018. Reuters/Mike Blake