A disgruntled worshipper in a ski mask opened fire on a Nashville-area church Sunday morning, killing a woman and wounding seven other people, authorities said.

A “hero” church usher eventually held the shooter at bay until cops arrived, witnesses said.

Emanuel Kidega Samson, 25, opened fire at the Burnette Chapel Church of Christ at 11:15 a.m., officials said.

A 39-year-old parishioner, Melanie Smith of Smyrna, Tenn., was walking to her car when she was shot, police said. She died from her wounds, authorities said.

Samson, an immigrant from Sudan who once attended the church, then entered through the rear of the building and silently walked down the aisle and began firing, witnesses said.

“Run! Run! Gunshots!’’ the pastor shouted to the roughly 40 adult parishioners in the pews, according to witness Minerva Rosa.

At one point, the masked gunman pistol-whipped a young church usher who tried to stop him, causing the man “significant injury around his head,” authorities said.

But the usher, 22-year-old Robert Engle, was still able to continue to fight the killer, who then accidentally shot himself in the chest, cops said.

“There was a significant struggle between the two,” Metro Nashville Police spokesman Don Aaron explained at a press conference.

“During the struggle, the gunman shot himself, probably not intentionally, in the left pectoral muscle,” Aaron said.

The usher then ran to get his own gun and held the wounded suspect for cops, according to News Channel 5.

“He’s amazing,’’ Rosa said of Engle, a licensed gun owner. “Without him, I think it could have been worse.’’

Metropolitan Police Chief Steve Anderson added, “He’s the hero — he’s the person who stopped this madness.”

The shooter was taken to a hospital for treatment.

All but one of the surviving victims are over the age of 60, and all were taken to Vanderbilt Medical Center, local fire officials tweeted.

Samson will be charged with murder and attempted murder, according to police.

“This is a terrible tragedy for our city,” Nashville Mayor Megan Barry said in a statement. “My heart aches for the family and friends of the deceased, as well as for the wounded victims and their loved ones.”

With AP