A man has been charged with committing a terrorist attack and attempted murder after a stabbing left a man in a critical condition in Sydney's south-west.

Police said they were called to Ohlfsen Road, in Minto, about 4:00pm on Saturday, where it is alleged a 59-year-old man was stabbed a number of times while walking through a reserve.

He suffered serious injuries to his body and hands and remains in hospital in a critical condition.

Paramedics said the victim was treated at the scene for serious injuries before being taken to Liverpool Hospital, where he remains in a critical condition.

When police from Macquarie Fields arrived at the scene, attempts were allegedly made to stab an officer through a window before a 22-year-old man was arrested.

A large knife was seized for forensic examination and the man was taken to Macquarie Fields Police Station, where he was questioned by police from the New South Wales Counter Terrorism Command.

The man was charged this morning with committing a terrorist attack and attempted murder, and refused bail to appear at Parramatta Bail Court on Sunday.

Police said the victim and the other man were not known to each other, and the ABC understands the man is known to the local community for his religious beliefs.

Police said there was no ongoing threat to the community in relation to the incident.