With one shot, an off-duty sheriff’s deputy took down a gunman who attempted to opened fire at a crowded movie theater lobby during a late night showing of “The Hobbit” in San Antonio, WOAI reports.

Police say a gunman, identified as Jesus Manuel Garcia, chased patrons from the nearby China Garden Restaurant into the lobby of the Santikos Mayan 14 movie theater at around 9 p.m. on Sunday. Garcia, an employee of the restaurant, reportedly walked in the establishment looking for a woman.

When the woman, also reportedly a restaurant employee, wasn’t there, Garcia pulled out a gun and attempted to open fire in the restaurant but his weapon jammed.

“It started at the restaurant and then went into the parking lot and then into the movie theater,” Deputy Lou Antu told 1200 WOAI news.

The commotion sent horrified restaurant patrons into the movie theater lobby, but the gunman followed. He again attempted to open fire, and this time his gun didn’t jam. Garcia reportedly shot one man in the chest before Antu says an off-duty sheriff’s deputy working security at the theater shot him once, dropping him to the floor.

Bexar County sheriff’s Sgt. Lisa Castellano reportedly chased the gunman toward the back of the theater. The 13-year department veteran cornered him after he ran into a men’s restroom and shot him before taking his gun.

“The officer involved, she took the appropriate action to try to keep everyone safe in the movie theater,” Antu added.

Due to the off-duty deputy’s bravery, the gunman was not able to make it into the theater where he could have potentially taken many lives.

The gunman and the man he shot remain hospitalized, according to WOAI.

Police say a recent breakup set off the man’s shooting spree on Sunday, MySanAntonio.com reports.

Jesus Manuel Garcia, 19, an employee at a China Garden restaurant next to the Santikos Mayan Palace 14 theater, apparently became upset Sunday night after his girlfriend broke up with him.

He lashed out by sending her a message saying he planned to go to the restaurant and “shoot somebody,” said Bexar County sheriff’s Sgt. Raymond Pollard.

Pollard said the woman called to warn restaurant employees, but by the time she saw his message, Garcia was already outside the China Garden firing a Glock 23 at the front door about 9:25 p.m.

If Garcia survives his attempt at mass murder, officials say he will likely face a charge of attempted capital murder as he allegedly shot at the San Antonia police car on Southwest Military Drive as he ran from the restaurant and into the theater.