WHEN a burglar tried to break into her home, 72-year-old no-nonsense Jan Cooper grabbed her trusty .357 Magnum and fired, missing the creep’s head by inches.

“I’m sorry, ma’am! I’m leaving! Please don’t shoot!” the burglar pleaded as he scurried away.

Now the gun-slinging granny is being hailed as a hero.

“She’s a remarkable woman. That burglar certainly wasn’t going to get into her home,” Gail Krause, a spokeswoman for the Orange County Sheriff ’s Department in California, told The ENQUIRER.

The incident unfolded shortly after midnight on June 9, when the barking of their dog Capo, a 4-year-old Rottweiler, woke Cooper and her husband Bob, an 84-year-old World War II intelligence officer confined to a wheelchair.

The burglar had tried to get in the front door of the couple’s home in Anaheim, but it was locked, and Jan spotted him outside an unlocked sliding glass door.

“When he began opening the sliding glass door, I knew I had to act,” said Jan, who dialed 911.

“I don’t ever want to shoot any­one, but I was going to make sure he wasn’t coming into my home. I yelled, ‘I have a gun. Back up. I’m firing!’ ”

The sound of the gun firing can be heard on the 911 tape. Cops later figured the bullet whizzed by the burglar’s left cheek, and lodged in the framework around the door.

After firing her Smith & Wesson, Jan exploded in rage.

“Back up, you son of a bitch. Back up!” she shouted. “Get out of here. Get the hell out of here. Get your butt out of here!”

Then she calmly told the dispatch­er: “You’d better get the police here. I don’t know whether I hit him or not.”

When deputies arrived, they found the burglar hid­ing in nearby bushes and arrested him.

“Even though the dog was barking, he was determined to get in,” said Krause.

“It’s a good thing she stopped him, because who knows what might have happened if he’d gotten in. It was a very dangerous situation.”

Afterward, Jan could not stop apolo­gizing – for cursing at the burglar!

“I’m a Christian woman and proud of it,” she said. “I don’t curse. But after I fired at him, rage took hold of me and those words just popped out of my mouth.

“My husband said he’d never heard me talk like that.”

The suspect, 31-year-old Brandon Alexander Perez, is behind bars on a burglary charge and has pleaded not guilty. He has a rap sheet that includes burglary and narcotics violations. He was out on parole and living at a half­way house not far from the Coopers’ home.

Jan said: “Mr. Perez should consider himself a lucky man to have walked away from my house in one piece.”