A man has been charged over a violent car theft that left a 74-year-old woman in hospital in the NSW city of Dubbo.

Police say a man struck the woman on the back of the head while she was putting her shopping in her car boot on Tuesday.

He wrestled the car keys from her and allegedly reversed over the woman’s feet, making her fall and hit her head.

She was treated in hospital for a cut to her head, a black eye and soreness to her feet, legs and shoulder.

An off-duty police officer spotted the suspect on Thursday and a 22-year-old was arrested in a car park, police said.

He was allegedly carrying a large knife and is accused of assaulting a constable at Dubbo Police Station.

The man is due to face Dubbo Local Court on Friday charged with a raft of offences, including aggravated robbery with wounding, take and drive conveyance without consent, and assaulting police causing actual bodily harm.