A luxury homeowner single-handedly tackled a machine gun-toting gang in a Die Hard-style shootout.

The seven-strong gang came charging onto his property trying to rob his guests but their host for the night and took them on – killing one in the shooting.

CCTV footage captured the scene on Sunday that looked like a scene out of the action film.

Seeing his friends off at the end of a party, the lone-defender leapt into action as the gang stormed through the gates which had been opened for his guests to leave.

Brandishing an AK47 machine gun, one masked gunman can be seen firing off three shots as the gang bursts in when the gates are opened to his home in the upmarket suburb of Karen, in the Kenyan capital, Nairobi.

The hooded attacker then chases after the blue-shirted householder, who takes cover inside his home.

Another gang member, camouflaged in dark clothing, chillingly levels a gun at the occupants of one car, while the driver in another is frozen with fear.

Within moments, though, the householder – who has not been named – grabs a licensed semi-automatic weapon to defend his home and save his guests.