A civilian employed by Australian police has been fatally shot outside the state police headquarters in western Sydney and his assailant was then killed, officials say.

New South Wales Police Commissioner Andrew Scipione said the victim was shot at close range with a handgun as he left wor. He said officers returned fire and killed the gunman.

The assailant's identity and motive have not been determined. The civilian was an information technology specialist for the police.

Police said there was nothing to suggest the shooting was terror-related, but refused to rule anything out as the investigation continued.

Witnesses reported seeing an armed man in a black gown pacing and yelling outside the police headquarters shortly before a series of shots were heard.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.