Ahmad Hraichie warns Muslims against drinking alcohol or having sex outside of marriage.

An Islamic undertaker made an eccentric video warning Muslims about the perils of celebrating New Year's Eve, as he wheeled a dead body into a morgue.

In the video, Ahmad Hraichie warns Muslims against drinking alcohol or having sex outside of marriage, while he goes about his duties at the Rookwood Cemetery in Sydney, Australia.

"This is where we are all going to spend our New Year's party if we die on New Year's Eve," he said in the footage shot on the last day of 2017.

"In the fridge, where our brothers and sisters have now probably got their drinks and their snacks. We're going to put our brother in the fridge. That could have been me. That could have been you.

"That could have been anybody. I say this with my heart - this brother was alive now he's not. I could be next, you could be next."

The undertaker continues: "Beware of what you do tonight. Anyone who's going to do anything that goes against our religion of Islam – drinking, fornication, Zina [adultery] – look at this man and this is an example Allah has given us. Stop it. Stop it before it's too late."

Hraichie has special words or warning for Muslims who plan to drink alcohol with non-believers on New Year's Eve.

He says: "Any other day is alright but not tonight because tonight we know what goes on."

The undertaker later told the Daily Mail Australia that he was only reminding people to behave in the way any religious person should.

He said: "Like all true Christians or Jews who abstain from sex before marriage and drinking alcohol, it's a reminder to stay steadfast in life and honest and true no matter what religion you are."

But he stopped short of saying Muslims should have nothing to do with Christmas and New Year festivities.

Hraichie said: "Everyone is entitled to worship what they want. I actually enjoy seeing houses decorated and the holiday season. Nothing wrong with fireworks. I actually watched them from the TV. Best view."

In November, the undertaker shot another video that attracted international attention.

In that video, Hraichie drove a hearse carrying the body of eight-year-old Jihad Darwiche - one of two boys who was killed when a Toyota Kluger accidentally ploughed into a primary school classroom in Greenacre, a western Sydney suburb.

He filmed Darwiche's father, with his son's coffin in the background, offering a message of forgiveness for the 52-year-old woman who accelerated into the classroom, killing two schoolchildren, and injuring three more.

In the footage Hraichie translates the father's Arabic message: "They [the family] have forgiven. If anything, they want to sit with this lady and talk with her and tell her 'we forgive you'. It was an honest mistake. It could have happened to any of us."