Updated

A Sri Lankan court Friday lifted a ban on the sale of milk products of New Zealand dairy giant Fonterra which has been under pressure over a global botulism scare.

The ruling came hours after Fonterra announced it was temporarily shutting down operations in Sri Lanka because of concerns over the safety of its staff amid allegations of product contamination.

A district court near the capital removed the ban following representations by the Auckland-based dairy firm, its legal representative, Sudath Perera, told reporters outside the court.

A court official said the ban, imposed a week ago, was lifted because the court decided that the public interest suit filed by a nurses' trade union had "suppressed and misrepresented facts".

However, it did not rule on the original complaint that Fonterra products were allegedly contaminated.

"The matter is still before court, but Fonterra is now free to continue with all their sales and marketing work," Perera told AFP.

Fonterra, at the centre of an unrelated botulism scare earlier this month which led to global recalls, said the temporary shutdown was "to protect our people and farmers' assets".

Fonterra had earlier recalled two batches of milk powder in Sri Lanka following orders from the Sri Lankan government because of allegations it contained traces of the chemical DCD.

Dicyandiamide, or DCD, is added to pastures to increase agricultural yields.

A New Zealand government website says DCD is not toxic and poses no food safety risks but Sri Lanka's health ministry considers it to be a "toxic chemical". Fonterra disputes Sri Lankan tests.

The Sri Lankan DCD recall was unrelated to the global safety recall announced by Fonterra after tests turned up a type of bacteria that could cause botulism.

Sri Lanka imported milk and milk products worth $307 million in 2012 with the bulk coming from New Zealand and Australia, the island nation's central bank says.