Arabica coffee prices gained 4.5% on Wednesday, with robusta coffee also posting sharp gains, as traders and brokers see a temporary halt in Brazil coffee selling due to harvest delays caused by rains.

World sugar prices, meanwhile, also rallied, with white sugar scaling 9-1/2-month peaks, as drought, heat stress and El Nino weather patterns threaten crops in major sugar-growing regions across Europe and Asia.

Arabica coffee ICEUS:KC1! closed at $3.090 per lb after hitting the highest prices since February 3 at $3.1640, while robusta coffee ICEEUR:RC2! rose 3.1% to $3,771 a metric ton, having hit a near four-month high earlier.

"Multiple trade sources confirmed fine cup offers in (Brazil) domestic markets have been withdrawn, with producers electing to hold back supply," said StoneX broker Tomas Araujo.

"Farmers were already not selling much even before the rains, and now they are still more reticent," said Jonas Ferraresso, a coffee agronomist who advises farms in Brazil.

He said a lot of coffee fell to the ground after the rains and farmers will have to decide how to deal with that in the coming days, which will see some dry weather back to most areas.

For farms that use mechanized harvesting, that is challenging, because getting that coffee from the ground will require hiring pickers and doing an entirely different harvesting work.

"Some people might decide not to pick at all," Ferraresso said.

On sugar, the raws ICEUS:SB1! rose 1.1% on ICE to 14.99 cents per lb​​, hitting a six-week high, while white sugar ICEUS:SF1! - the type produced in Europe - rose 1.7% to $482.90 a ton, after hitting a nine-month high at $488.10.

Europe has been in the throes of a record-breaking heatwave.

Forecasters have warned that beets in parts of Europe have withered and that many sugar-growing areas are likely to remain excessively dry for at least the next week to ten days.

"Crop conditions may deteriorate further and concerns for significant production losses will remain high," said broker ADMIS.

In Europe's largest sugar grower France, forecaster Meteo France sees no rain in key sugar areas until at least July 14, a situation French sugar beet association CGB described as potentially catastrophic.

Elsewhere, No. 2 sugar grower India is likely to receive below-average monsoon rainfall in July after logging its fifth-driest June since records began in 1901.

In other soft commodities, London cocoa ICEEUR:C2! ​​was little changed at 3,817 pounds per ton, while New York cocoa ICEUS:CC1! rose 0.3% to $5,092 a ton.