Shocking footage has been released capturing the moment a police officer was stabbed in the back in a brazen attack in front of commuters at Sydney’s transport hub of Central station on Friday night.

The footage obtained by The Sunday Telegraph shows a man holding a duffel bag sidle up to Constable Hayden Edwards and strike the officer from behind.

Rail passengers can be seen fleeing from the altercation.

The officer is filmed pulling out his service weapon as he falls to the ground before rising to a standing position while more officers arrive at the scene.

The other man makes striking notions with the knife while holding up his duffel bag appearing to be yelling something at the officers. What he was saying is unclear.

The assailant can be seen retreating as police officers advance on him with a taser.

On Saturday, Police charged a 53-year-old man with wounding with intent to cause grievous bodily harm, use offensive weapon to prevent lawful arrest, resist arrest, and custody of a knife in a public place.

He was refused police bail to appear in Parramatta Court today.

The 30-year-old constable — attached to the Police Transport Command — was taken to Royal Prince Alfred Hospital. He underwent surgery and was released from hospital on Saturday.

He was stabbed while responding to an incident on platform 1, where interstate trains usually depart from, at about 6.45pm Friday night.

Police had been called to the station in response to an assault and were talking to two people when the incident took place.

Police said the officer was lucky to escape with minimal injuries.

30-year-old Cst Hayden Edwards is recovering in RPA after allegedly being stabbed in the back while on duty for the Police Transport Command overnight. A 53yo man is in custody. We send our warmest wishes to Hayden as he recovers. https://t.co/cvgJPNFdDp pic.twitter.com/wST7Au8el1 — NSW Police Force (@nswpolice) April 20, 2019

“He hasn’t had a lot of sleep and he is in quite a lot of pain, but I think he is lucky given the circumstances, and is now recovering,” Assistant Commissioner Karen Webb told reporters at a media conference this morning.

Witnesses said the alleged attack was unprovoked.

A NSW Ambulance spokesman told news.com.au they had three crews attend the scene to treat the officer.

A Sydney Trains employee who witnessed part of the incident said the alleged attacker was tasered by police.

“I just saw this caucasian guy wielding a knife and the cops were trying to pacify him but he wouldn’t stop,” the man told ABC.

“He didn’t stop so he was tasered.”

Pepper spray is the worst. In future, I will try not to walk into a cloud of it during an unfolding police operation 😫 #centralstation pic.twitter.com/IjldetwLQ1 — Brooke Wylie (@brookewylie) April 19, 2019

It is understood about 12 officers were at the scene and pepper spray was used.

Chief inspector Paul Carrett said the incident was a reminder of the grave dangers police officers faced daily.

“The bottom line is that policing is a dangerous game and the officer in this case has been very lucky and we are very thankful that he didn’t receive more serious injuries,” he said.

“The stabbing of a police officer unprovoked is a very serious matter, and something that obviously that is concerning to us all the time.”