This is the terrifying moment a wild king cobra headbutts a window to try and get inside at three kittens - before a man batters its to death with a stick.

The deadly serpent slithered across a tree branch before perching on the window ledge before sizing up three kittens inside the room.

In spine-chilling footage, the black cobra repeatedly hits its head against the glass while staring at its prey and flicking out its forked tongue.

The three white cats stare up at the snake transfixed by its bizarre behaviour.

But in a dramatic twist, a man arrives minutes later to batter the reptile to death with a long white piece of wood outside the home in Kilanas, Brunei.

The clip was handed to forestry officials at the government who used it to warn residents about the dangers of snakes clambering up trees and entering through open windows.

The cobra flicks its forked tongue out clearly hungry for the kittens behind the window

They said: 'Be aware. If you keep flowers or a small tree, don't make it near the window of the house. Luckily the window glass was not open.'

The clip was given to the government by the person who lives in the house. He said that his niece had filmed it.

But they wanted to remain anonymous and asked for the government - overseen by the Sultan of Brunei - to use the footage to warn about snakes.

A spokesman for the Brunei government's environmental department said: 'The video was made at a home in Brunei and given to us last week.

Despite the cobra slamming its head against the window, the curious kitten below is unfazed

'I have visited the house where it happened and spoken to the family. A young girl recorded the video.

'The family want to help people to remember not to leave their windows open or to have trees and plants near them. This makes it easy for snakes to get inside and can be dangerous.

'Take care to make sure there are no trees near windows and close the windows.'