A horse has died from the Hendra virus on the NSW mid north coast, in the state's first case of the infection for almost two years.

A property west of Macksville has been placed in quarantine following the mare's sudden death on Wednesday. 

The Department of Primary Industries said three family members and a vet had been given the all clear after being assessed for exposure to the infectious horse.

Samples are being taken from another horse, three dogs and two cats that also live on the farm.

NSW Chief Veterinary Officer Ian Roth said the Hendra virus was positively identified yesterday after samples from the dead horse were sent for analysis.