A brave dad armed with a pistol stopped what could have been a mass shooting Saturday inside an Alabama McDonald's when he took down a masked gunman who had stormed in and opened fire.

The unidentified father was leaving the establishment with his sons when a masked man walked into the Birmingham fast-food restaurant and started shooting, WBRC-TV reported. The father returned fire and, during the ensuing shootout, the gunman, the father and one of the man's teenage sons were struck, according to the station.

The gunman, who was not identified, later died of his injuries. The other two injuries were not considered life-threatening.

Markus Washington, one of the McDonald's employees, told WBRC-TV he was making two quarter-pounders when bullets started to fly. Washington said he ran into the freezer, where he heard about 15 shots fired.

“I’m feeling grateful,” he told the station. “Wrapping my head around it all, I was just wishing someone would come wake me up from this nightmare.”

Washington feared the worst as the shootout unfolded outside the freezer door.

“All we hear is like different gunfire, so in my mind, I’m imagining everybody is dead. He’s looking for us,” he said. Washington added he was thankful the armed customer was there.

"Wrapping my head around it all, I was just wishing someone would come wake me up from this nightmare." — Markus Washington, McDonald's employee

“He’s my hero. Because I can only imagine how it would’ve went if he wasn’t armed. We might not be here having this interview,” Washington said.

The father is not expected to face charges, police said.

Authorities are now working to determine if the gunman intended to rob the restaurant, was targeting an employee or planned something more nefarious.

“Things like this are difficult for both families. The gentleman who unfortunately lost his life, the teenage boy who is in the hospital recovering from his injuries and the father who is also recovering from his injuries,” Birmingham police spokesman Sgt. Bryan Shelton said, according to WVTM-13. “It's not easy being a father and watching your child get injured, get hurt like that. It's a really heartwrenching experience."