Rockmelons from a farm in New South Wales have been linked to two deaths among 10 cases of listeria nationwide, including three in Queensland.

The victims fell ill between 17 January and 9 February, with the company responsible for the outbreak ceasing production on 23 February.

Listeria is a bacteria which is particularly dangerous for pregnant women and people with compromised immune systems.

New South Wales food authorities recommended rockmelon be thrown away if the source of the fruit can’t be confirmed.