A former Marine has been arrested in the beating of two men outside a popular gay bar in Southern California last year and will face hate-crime charges for using anti-gay slurs during the attack, the Los Angeles County District Attorney's Office said Thursday.

John Kelly O'Leary, 21, was arrested Monday by police in Evergreen Park, Ill., Deputy District Attorney Gretchen Ford of the hate crimes unit said in a statement. O'Leary was discharged from the Marines on Oct. 19, about six weeks after the attack, Marine Corps’ spokesman Master Gunnery Sgt. Mark Oliva told NBC News. He will be extradited from Illinois to California to face the charges.

O'Leary and a group of friends, including other Marines, went to the Silver Fox bar in Long Beach, Calif. in the early morning hours of Sept. 3, 2012. O'Leary was accused of shouting anti-gay slurs outside the bar at closing time, which triggered the hate crime charge, said Jane Robison, a spokeswoman for the district attorney's office.

"Following a verbal exchange with one of two alleged victims, O’Leary allegedly turned and began punching the first alleged victim as he continued to shout anti-gay slurs. The victim, who suffered a concussion and a fractured hip during the altercation, was knocked unconscious," the statement said. "As others joined in to break up the fight, O’Leary allegedly began punching and choking a second male victim before police arrived."

O'Leary has been charged with two felonies – battery with serious bodily injury and assault by means likely to produce great bodily injury – and faces up to eight years in prison, which includes time for the hate crime allegation, Robison said. The Press-Telegram of Long Beach first reported the charges.

Authorities arrested three other Marines after the attack, but they were not charged, the district attorney's office said. Robison said they were attempting to break up the assault, and Oliva said they were on active duty with their commands.

The four Marines, based at Camp Pendleton in southern California, were in their first enlistment. Oliva characterized O’Leary’s discharge as “less than honorable,” but he didn’t have the exact nature of it. He also said the Marine Corps was still conducting an inquiry into the attack.

Robison said she didn't know if the two victims were gay. Immediately after the attack, CBSLA.com reported that one of the victims had gone to the bar with his boyfriend and that he had blacked out from the assault. He was hospitalized overnight and released with non-life threatening injuries, Long Beach police said at the time.

O'Leary is being held on $105,000 bail. He has waived extradition and will be transported to Los Angeles some time next week, the district attorney's office said. Attempts to reach O'Leary, his family or an attorney representing him were unsuccessful.

Related: