A man is facing a battery charge after he was shot on a Red Line train and then allegedly used the gun that wounded him to beat the shooter.

Roy Lee, 38, was denied bail at a hearing Sunday for the charge of aggravated battery and use of a deadly weapon, according to the Cook County sheriff’s office.

Lee, who lives in the South Shore neighborhood, allegedly began fighting with a 24-year-old man early Saturday on a Red Line train at the Cermak-Chinatown stop, according to Chicago police.

The 24-year-old, who had a concealed carry license, pulled out a gun and shot Lee in the abdomen, police said. Lee, in turn, grabbed the weapon from him and began beating him with it.

Both men were taken to Northwestern Memorial Hospital in serious condition, according to police.

Lee was scheduled to appear in court again on Friday, according to court records.