Yei, South Sudan - Under the hot, midday sun, a handful of farmers huddle around a coffee tree, holding down a branch to pick off the ripe, bright red coffee cherries.

"There's a lot of benefit in growing coffee," says Iseya Lokolo Latio, a coffee farmer.

The statement reflects a new way of thinking among local farmers, many of whom have casually grown coffee for decades. This year, however, they are scaling up and selling their beans abroad to multinational coffee company Nespresso.

"The money I get will pay for school fees and medicine," Latio says as he drops off six kilos of coffee cherries at the cooperative's newly built wet mill.

The coffee cooperative offers an idyllic rural scene rarely associated with South Sudan, a country that continues to be plagued by a brutal conflict despite a fragile peace deal struck in August this year.

Even as the farmers are harvesting coffee to be sold in Nespresso stores around the world, more than 3.9 million, a third of the population, is at risk of going hungry, with 4.6 million in need of humanitarian assistance.

Since the conflict began in December 2013, more than two million have been forced from their homes, unable to tend to their fields. Traders can only access hard currency on the black market at more than five times the official rate, which has hindered imports and sent prices through the roof.

While fighting has been raging in the north, the surroundings of Yei town, located near the country's southern border with the Democratic Republic of Congo, have remained relatively peaceful. The area is known as the country's agricultural heartland. It is perhaps the only part of South Sudan that still stands a chance of luring wary investors, many of whom left the country when fighting broke out.

Marketing coffee for hope

Nespresso decided to set up shop here after it discovered the distinctive taste of South Sudan's coffee beans. Nespresso is a subsidiary of Nestle, one of the world's largest food corporations. The company pledged $2.6m to develop South Sudan's coffee export sector.

Nespresso is marketing its investment through brand ambassador George Clooney, as a unique chance to diversify South Sudan's heavily oil-dependent economy, build peace and offer a glimmer of hope for war-torn South Sudan.

"Being able to sell coffee on the international market has restored a sense of pride among the farmers," said Janno Van Der Laan, South Sudan country manager for Technoserve, an NGO funded by Nespresso to improve production techniques of coffee farmers.

Coffee farmers have welcomed Nespresso's investment, which offers an opportunity to scale up production beyond the limited local demand and charge a premium price.

"It's much better to harvest the coffee for export. We just take it to the wet mill and get our money. It's easier than having to look for a market here in South Sudan," said Sebastian Hakim Daniel, a coffee farmer who also heads the local coffee cooperative established by Technoserve.

Until the farmers produce higher yields, the $2.2 they earn a kilo of dried coffee won't be enough to make a living. But already the coffee trade is proving lucrative - and word is getting around.

"We are thinking of growing coffee in the future," said Simon Lomeriga, a farmer who heard about Nespresso's initiative.

"Some of us have coffee trees, but we haven't developed them because up to now, there was no market," said Lomeriga, who leads a cooperative that grows cassava, maize and other crops for consumption in Yei and, when yields allow, the capital Juba.

Infrastructure development obstacles

As Nespresso is looking to expand its network of coffee growers from 200 to 8,000 by 2020, farmers in the region might soon be faced with a choice: Grow coffee for export or grow food for the non-farming and urban population.

Given the current scarcity of inputs to production, it seems like an unavoidable trade-off.

In theory, South Sudan is endowed with vast stretches of fertile land, more than enough to grow food for its own population and export cash crops. But much of the country's agricultural prime real estate remains untouched due to conflict, poor infrastructure and lack of public and private investments.

The struggle of Lomeriga's cooperative epitomises the consequences of institutional neglect of the agricultural sector. Tractor-hire services are not available in the region, limiting his farmers to manual tools when tilling or watering their fields.

Even labour is becoming increasingly scarce in South Sudan, a country with one of the lowest population densities in sub-Saharan Africa. The handful of laborers working the fields were brought from neighboring Congo.

"It is difficult to find workers. The youth want to go to the towns to look for jobs there," said Lomeriga.

Food production for local markets

Although coffee might present an attractive alternative to farmers who struggle to grow food, many don't believe it is a priority for their young, troubled nation.

"We need to produce food now, with all these people fleeing from other parts of South Sudan due to conflict," said farmer Eli Lomoro, referring to tens of thousands of displaced people who have arrived in Yei since 2013 - a 10 percent increase in the city's population in two years, by official estimates.

"There is not enough food in the local markets," Lomoro added.

Most food consumed in South Sudan is imported and, with the plummeting value of the South Sudanese pound vis-à-vis the US dollar, increasingly unaffordable for much of the population. Producing more food locally would ease the pressure, but private investment is needed to do so.

"Farmers are doing their level best. There's a need for the private sector to get involved," said Salah Edward, principal at the Yei Agricultural Training Centre, a local NGO that works with farmers to improve yields.

Experts believe such investments should be channeled on the basis of the nation's priorities.

"The priority should be to fulfil the needs of the local demand. The next step is to go for cash crops to be imported into other countries, for example coffee, tea and tobacco," said Edward, who is a trained agro-economist.

Now that a peace deal has been signed, the government is optimistic that investors will pour in.

"The most important thing we need now is peace. I believe the investors are eyeing this country," said Beda Machar Deng, South Sudan's minister of agriculture.

But in order to unleash the country's agricultural potential, the government first needs to create a viable investment climate and start spending on infrastructure rather than its military.

Until then, Nespresso's coffee farms are likely to remain the only lucrative option for resource-strapped farmers.

MORE Al Jazeera coverage on South Sudan