Nestle, the world's biggest food company, will pay poor cocoa farmers more for their beans by switching its best-selling KitKat bar to Fairtrade.

Embarking on what its British chocolate boss described as an ethical "long journey", the four-finger KitKat will carry the Fairtrade logo from next month. Over the next two years the two-finger and other versions of the £183 million ($420 million) a year bar will make the switch.

More than 8000 cocoa farmers in Cote d'Ivoire (formerly Ivory Coast) will benefit, receiving an extra US$150 ($208) a tonne, 4 per cent above the US$3384 ($4715) world price.

They will also be able to sell their cocoa more directly to Nestle and receive advice from the Swiss giant on raising yields and quality, which will further increase returns.

Nestle said the extra money would fund education and healthcare in the West African state, which is recovering from the 2002-2007 civil war.

For the coffee-to-cereals multinational, the deal will help boost the supply of cocoa. Prices have spiralled to a 26-year high because of investor speculation and the failure of producers such as those in Cote d'Ivoire to meet rising global demand.

Nestle's decision will also help it to improve its chequered reputation for ethics. In the 1970s and 1980s consumers boycotted the company, which makes Nescafe, Perrier and Cheerios, over its promotion of baby milk formula in Africa. The protests have fallen away since the adoption of a marketing code of conduct.

KitKat is the latest example of Fairtrade being "mainstreamed" following Starbucks' decision to convert its espresso beans, Tate & Lyle its retail sugar, and Cadbury its Dairy Milk chocolate bar.

It came about after Nestle Confectionery UK's managing director, David Rennie, visited Cote d'Ivoire in October. Asked to describe life for cocoa farmers, he said: "They're not going hungry and they're not going thirsty but they live in a way in which the crops they produce are very important.

"The nearest school could be 20 or 30 miles away and they have no transport, so getting local village schools where kids can get literacy and numeracy skills without embarking on massive treks is really important.

"And the fact that we can go in and help them build schools and can give help on the ground was enlightening and heartening for me."

Only KitKats sold in the UK and Ireland will go Fairtrade, but Rennie would not rule out other Nestle chocolate brands following.

"In the UK we have started with as much of the Fairtrade cocoa from our co-operatives as we can get. And every single year we hope to get more of that and get it moving across all of KitKat," he said.

"We're putting no end point on this. As the cocoa supply develops, we want to continue our work on the Ivory Coast to support those farmers."

Harriet Lamb, director of the UK-based Fairtrade Foundation, said the higher prices would "give a break" to the farmers of Cote d'Ivoire.

"If any farmers need this kind of break, it's the farmers in Cote d'Ivoire," she added.

Nestle sells one billion KitKat bars in the British Isles each year, which makes up 23 per cent of its UK confectionery sales. It and other leading chocolate bars will still contain palm oil, which is linked to human-rights abuses, deforestation and the loss of wildlife in Southeast Asia.

Nestle has committed to buying only supplies certified by the Roundtable on Sustainable Palm Oil by 2015.

"The commitment is the company moves by 2015 and I think for the whole company to get there by 2015, markets and product categories will get there quicker.

"So that's the end point, it's not the beginning point," said Rennie, who described the Fairtrade commitment as part of a "long journey".