Terrifying CCTV footage shows the moment a man dragged himself to safety after he was shot outside a gay sex club allegedly by a Muslim extremist.

Milad bin Ahmad-Shah al-Ahmadzai is accused of shooting the 53-year-old at close range outside Aarows nightclub at Rydalmere, north west of Sydney, in May 2013.

The distressing footage was played at al-Ahmadzai's trial on Wednesday at Parramatta District Court where he has pleaded not guilty to five charges, Nine News reports.

Scroll down for video

Terrifying CCTV footage shows the moment a man dragged himself to safety after he was allegedly shot by Milad bin Ahmad-Shah al-Ahmadzai outside a gay sex club at Rydalmere, north west of Sydney, in May 2013

It shows two men with their heads covered kicking and shooting the victim at least seven times.

Security cameras captured the man running through the car park towards the sex club before frantically banging on the door trying to get inside.

The man was filmed collapsing on the ground once inside the club before leaving a trail of blood as he crawled to safety.

Al-Ahmadzai, who is currently serving a nine-month jail sentence for threatening to 'slit the throat' of an intelligence officer, has pleaded not guilty to charges of shooting with intent to murder.

The distressing footage was played at al-Ahmadzai's trial on Wednesday at Parramatta District Court where he has pleaded not guilty to five charges, including shooting with intent to murder

Security cameras captured the man running through the car park towards the sex club before frantically banging on the door trying to get inside

The man was filmed collapsing on the ground once inside the club before leaving a trail of blood as he crawled to safety

He has been at Goulburn's maximum security prisons since 2013.

The alleged terrorist sympathiser has repeatedly refused to stand in court during his trial on the grounds of his religious beliefs saying he is 'not at the behest of any authority other than Islam'.

NSW Attorney-General Gabrielle Upton became frustrated with his lack of respect of the judicial system and ordered Solicitor-General Michael Sexton SC to consider contempt charges on Monday.

The 53-year-old victim was filmed on security cameras collapsing on the ground once inside the club before leaving a trail of blood as he crawled to safety

The man was filmed leaving a trail of blood as he dragged himself to safety

Al-Ahmadzai, who again failed to stand for Judge Gregory Farmer SC on Monday at his attempted murder and car theft trial, could now be prosecuted by Mr Sexton.

'He's not making a scene and he's not intending to be disrespectful,' his lawyer told court on Wednesday.

'It's about a balancing of duties.'

Al-Ahmadzai was allowed to bend strict rules at his maximum security prison at Goulburn because he claimed he had to sit rather than kneel - like other prisoners - before any officers entered his cell.

Milad bin Ahmad-Shah al-Ahmadzai is accused of shooting the 53-year-old at close range outside Aarows nightclub at Rydalmere, north west of Sydney, in May 2013