DREW BARRYMORE’s terror as machete wielding “crazy wild man” nearly separates star from her head!

Drew, 37, miraculously survived a bloodcurdling close encounter with machete-wielding Hollywood director and producer Guy Magar, who mistook her for a burglar.

The frightening incident unfolded when Drew, then 8, and her mom Ildiko “Jaid” Barrymore turned up at Magar’s Hollywood Hills house at 2 a.m. to return an evening gown borrowed from his wife.

Awakened by the noise, Magar says he grabbed his “trusted machete from under our bed” – and sprang into action like a “crazy wild man.”

In his new book “Kiss Me Quick Before I Shoot,” Magar recalls screaming “Ahhhh!” as he flung open the front door – ready to decapitate the intruders.

In the nick of time, he recognized the two, who’d been planning to leave the borrowed gown outside.

“It was my wife’s friend Ildiko and her 8-year-old daughter Drew, screaming even louder than me!” Magar wrote in the book.