CALGARY - A ship carrying phosphate rock from Africa's Western Sahara is on its way to Canada again after being released by authorities in Panama on the weekend.

The ship, carrying ore to be used in an Alberta fertilizer plant owned by Agrium (AGU.TO), was detained by court order last week in connection with a dispute over the Western Sahara, a territory controlled by Morocco but claimed by the Saharawi Arab Democratic Republic or SADR.

Richard Downey, Agrium's vice-president of investor relations, says ship owner Danish Ultrabulk A/S posted a bond to allow the vessel's release and is handling legal issues in Panama.

SADR says the phosphate rock has been illegally mined and sold by an occupying government.

Agrium cites an independent legal assessment that concluded buying from OCP, the Moroccan government-owned phosphate mining company, does not contribute to negative human rights outcomes.