(CNN) As soon as gunshots tore through a Waffle House, James Shaw Jr. bolted and hid in a restroom.

But he kept an eye and an ear out for the gunman. And the moment the shooter paused, Shaw decided to ambush him.

That heroic act by a customer saved countless lives at a Nashville-area Waffle House, where a seminude gunman killed four people early Sunday morning

Shaw "saw the gunman looking at his rifle. At that point, the shots had stopped," Metro Nashville police spokesman Don Aaron said.

"So he decided to rush the gunman, actually wrestled that assault rifle away, tossed it over the counter. At that point, the gunman then fled."

Shaw was grazed by a bullet on his elbow while grappling with the gunman.

James Shaw Jr., 29, shows one of the injuries he suffered after ambushing the gunman.

He also burned his right hand grabbing the barrel of the weapon, which police called an "assault-type rifle."

Investigation on going at the Waffle House. Scene being processed by MNPD experts. This is the rifle used by the gunman. pic.twitter.com/lihhRImHQN — Metro Nashville PD (@MNPDNashville) April 22, 2018

Shaw "is the hero here, and no doubt he saved many lives by wrestling the gun away and then tossing it over the counter and prompting the (gun)man to leave," the police spokesman said.

Witness Chuck Cordero saw everything unfold from outside the Waffle House's famously wide windows.

As he ran away, "I looked back and there was a gentleman wrestling with the gunman," Cordero told CNN affiliate WSMV

"He was a hero ... had that guy had a chance to reload his weapon, there was plenty more people in that restaurant."

JUST WATCHED Man who disarmed killer describes chaotic scene Replay More Videos ... MUST WATCH Man who disarmed killer describes chaotic scene 02:19

But Shaw, 29, insists he wasn't heroic. He says he was actually being selfish.

"I'm a believer that everybody could do what I did," Shaw told WSMV.

"I think when people say it's heroic, it's kind of weird, because I did it 100% to save myself. And I guess I did save other people."

But Shaw broke down thinking about the people he couldn't save and apologized to their families.

JUST WATCHED Police say a customer saved lives in Waffle House shooting Replay More Videos ... MUST WATCH Police say a customer saved lives in Waffle House shooting 02:06

"There's four families that are grieving right now. So much life was lost for no reason. I feel like it could be very selfish of me if I didn't point it out. And I apologize," he said.

Shaw said he wants to stay in touch with those families, as well as the survivors.

"I would love to talk to you and know that you're OK," he said.

On a personal note, Shaw is grateful he survived to see his 4-year-old daughter again. He wants her to grow up in a world with less tragedy.

"I hope we can bring violence in all facets -- not just gun violence, but all facets of violence -- to an end," he said.