The mayor of a rural town in western NSW says his community is hurting after the death of a young miner.

A small mining community in western NSW is mourning the loss of a young miner who was killed after being sucked into a pipe.

The 26-year-old man was trying to clear debris from a pipe at the CSA underground copper mine in Cobar when he became trapped.

Police say co-workers pulled him out but he died in hospital on Wednesday night.

The man, from Victoria, lived in the small township.

“People in Cobar, they really feel a mine accident,” Cobar Shire mayor Lilliane Brady told AAP on Thursday.

“It is a tragic time for us all.”

The mine’s parent company, Glencore, said counselling was being offered on site.

“We are co-operating with the NSW police and other authorities … and have notified the man’s family,” the company said in a statement.

Production at the mine has been suspended since the tragedy.

NSW Resources and Energy Minister Anthony Roberts also extended his condolences.

“Prayers to the man’s family, friends, co-workers and the wider Cobar community during this difficult time,” he said.

It is the fourth death at a NSW mine in three months.

In May, a Queensland man died after he was hit in the head by machinery at the Boggabri coalmine in northwestern NSW.

The man was a construction rigger working on the coal expansion project.

In April, Jamie Mitchell, 49, and Phillip Grant, 35, died after a wall collapsed on them 500m below ground at a coalmine in Paxton.