Image copyright Getty Images

Think of coffee and you will probably think of Brazil, Colombia, or maybe Ethiopia. But the world's second largest exporter today is Vietnam. How did its market share jump from 0.1% to 20% in just 30 years, and how has this rapid change affected the country?

When the Vietnam war ended in 1975 the country was on its knees, and economic policies copied from the Soviet union did nothing to help.

Collectivising agriculture proved to be a disaster, so in 1986 the Communist Party carried out a U-turn - placing a big bet, at the same time, on coffee.

Coffee production then grew by 20%-30% every year in the 1990s. The industry now employs about 2.6 million people, with beans grown on half a million smallholdings of two to three acres each.

This has helped transform the Vietnamese economy. In 1994 some 60% of Vietnamese lived under the poverty line, now less than 10% do.

Coffee Vietnamese style Ca phe da - Coffee served on a bed of ice

Ca phe sua da - Coffee served with condensed milk, on ice

Ca phe trung - like a cappuccino, except with the addition of an egg or two

Kopi luwak - The process of making coffee by feeding beans to civets - a type of weasel - and then roasting the excreted beans

"The Vietnamese traditionally drank tea, like the Chinese, and still do," says Vietnam-based coffee consultant Will Frith.

Vietnamese people do drink it - sometimes with condensed milk, or in a cappuccino made with egg - but it's mainly grown as an export crop.

Coffee was introduced to Vietnam by the French in the 19th Century and a processing plant manufacturing instant coffee was functioning by 1950.

This is how most Vietnamese coffee is consumed, and is partly why about a quarter of coffee drunk in the UK comes from Vietnam.

British consumers still drink a lot more of that than of fancy coffees, such as espressos, lattes and cappuccinos.

High-end coffee shops mainly buy Arabica coffee beans, whereas Vietnam grows the hardier Robusta bean.

Find out more Image copyright AFP Watch The Coffee Trail, with reporter Simon Reeve, on BBC Two at 20:00 GMT on Sunday - or catch it later on the iPlayer

Arabica beans contain between 1% to 1.5% caffeine while Robusta has between 1.6% to 2.7% caffeine, making it taste more bitter.

There is a lot more to coffee, though, than caffeine.

"Complex flavour chemistry works to make up the flavours inherent in coffee," says Frith.

"Caffeine is such a small percentage of total content, especially compared to other alkaloids, that it has a very minute effect on flavour."

Some companies, like Nestle, have processing plants in Vietnam, which roast the beans and pack it.

But Thomas Copple, an economist at the International Coffee Organization in London, says most is exported as green beans and then processed elsewhere, in Germany for example.

While large numbers of Vietnamese have made a living from coffee, a few have become very rich.

Image copyright AFP Image caption Dang Le Nguyen Vu: Next step, an international coffee shop chain

Take for example multi-millionaire Dang Le Nguyen Vu. His company, Trung Nguyen Corporation, is based in Ho Chi Minh City - formerly Saigon - but his wealth is based in the Central Highlands around Buon Ma Thuot, the country's coffee capital.

Chairman Vu, as he is nicknamed, owns five Bentleys and 10 Ferraris and Forbes magazine assessed him to be worth $100m (£60m). That's in a country where the average annual income is $1,300 (£790).

Who buys Vietnam's coffee Vietnam produced 22m 60kg bags of coffee in 2012/13

Germany and the US imported about 2m

Spain, Italy and Belgium/Luxembourg imported about 1.2m

Japan, South Korea, Poland, France and the UK all imported in the region of 0.5m Source: ICO

The expansion of coffee has also had downsides, however.

Agricultural activity of any kind holds hidden dangers in Vietnam, because of the huge numbers of unexploded ordnance remaining in the ground after the Vietnam War. In one province, Quang Tri, 83% of fields are thought to contain bombs.

Environmentalists also warn that catastrophe is looming. WWF estimates that 40,000 square miles of forest have been cut down since 1973, some of it for coffee farms, and experts say much of the land used for coffee cultivation is steadily being exhausted.

Image copyright AFP

Vietnamese farmers are using too much water and fertiliser, says Dr Dave D'Haeze, a Belgian soil expert.

"There's this traditional belief that you need to do that and nobody has really been trained on how to produce coffee," he says.

Image copyright AFP Image caption Hanoi has independent coffee shops - last year it got its first Starbucks

"Every farmer in Vietnam is the researcher of his own plot."

Some people from Vietnam's many ethnic minorities also say they have been forced off their land.

But Chairman Vu says coffee has been good for Vietnam.

He is now planning to set up an international chain of Vietnamese-style coffee shops.

"We want to bring Vietnamese coffee culture to the world. It isn't going to be easy but in the next year we want to compete with the big brands like Starbucks," he says.

"If we can take on and win over the US market we can conquer the whole world."

Watch The Coffee Trail with Simon Reeve on BBC Two at 20:00 GMT on Sunday or later on the iPlayer.