A terrified Liz Hurley nearly lost her baby — and her own life — after chilling threats from a crazed stalker!

Just days before she was due to give birth, the “Austin Powers” beauty was forced to flee her home and go into hiding when the psycho warned he’d “get rid” of her baby.

The stress sparked a life-or-death drama when Liz’s blood pressure soared to dangerously high levels, insiders say — and her doctors discovered her unborn child wasn’t getting enough oxygen.

So she was rushed to London’s Portland Hospital for an emergency cesarean section. Her son Damian Charles was delivered two weeks premature.

“This was a very scary experience for Liz,” revealed a source close to the 36-year-old first-time mom.

“Doctors told her she needed a C-section urgently or she could have lost the baby — or even her own life.”

The “Bedazzled” beauty has been living in fear since the disturbed fan — 32-year-old Petar Mihajlovic — was first arrested in London back in December.

The stalker was arrested again on the day Liz gave birth to her 6-pound, 8-ounce baby boy. When he appeared in court, he claimed to live in Hollywood.

“Liz tried to ignore him when he first showed up on her doorstep, but he was very persistent and creepy,” revealed the source.

“He kept buzzing her on the intercom at her home in the south Kensington section of London and demanding to be let in.

“He claimed to reporters that he was ‘a very good friend’ and that her pregnancy was a hoax.

“Then he shoved a letter through the door that said, ‘Don’t have your baby.’

“He sent her another note saying, ‘I know you really love me. If you have the baby you could say it’s mine.’

“He also warned her, ‘I don’t think Hugh Grant should be living at your house.’

“That’s when Liz and Hugh decided the guy had gone too far and gave the letter to cops.

“When they arrested him he was carrying a Dalmatian puppy doll with a note claiming he was the real son of Marilyn Monroe.

“Just days before she was due to give birth, the guy shoved another note through her door telling her to ‘get rid’ of the baby — or else he would.

“Liz went to pieces and was bundled out of the house in tears by bodyguards.

“She went to stay with a friend, but she was totally stressed out and had to be rushed to the hospital because he blood pressure soared. She could have lost the baby.”

Fortunately, mother and child are both doing fine.

Besides the stalking trauma, Liz still faces a paternity battle with playboy producer Stephen Bing — the man she claims fathered her son.