Two tradies were forced to intervene to rescue a police officer who was allegedly being attacked by a man on a street on the NSW South Coast.

Wollongong man Alex Jelley filmed the moment the 40-year-old accused appeared to grab and jostle with an officer on a street in Nowra around midday on Thursday.

"Leave him alone... he's just doing his f---ing job," one of the tradies can be heard saying.

The two tradesmen rushed in to try and pull the alleged attacker off before lifting him up and carrying him to the footpath.

They then helped pin him to the ground as the officer handcuffed him.

The video, captioned "Good old Nowra", has been shared more than 7000 times since it was uploaded to Facebook on Thursday.

A police statement said the officer was out on patrol when he saw the 40-year-old accused standing in the middle of the street.

The man then allegedly approached and began punching the police cruiser's driver-side window before grabbing the policeman by the neck.

He has since been charged with assaulting police, resisting arrest, offensive conduct and attempted malicious damage.