THE Coffee Industry Development Office of Pu'er is located in the city's Tea Industry Bureau building, its roof designed to look like a leaf of this city's ubiquitous crop. It is also one of the rare offices in China where a government official will greet a visitor with a decent cup of coffee—even though the deputy director, Liu Biao, was until a year ago promoting tea.

In 2007 this city in southern Yunnan province (see map) changed its name from Communist-era Simao back to its historical name of Pu'er, in order to capitalise on the tea leaves that it made famous. Now Pu'er is once again overhauling its identity. Farmers here endured the collapse in 2008 of a bubble in the price of Pu'er tea, possibly manipulated by officials and speculators. They are now rapidly sowing more coffee seeds, with the encouragement of the local government. Some growers are clearing forested hillsides, something they once did to plant tea. Pu'er today has 28,000 hectares (70,000 acres) of coffee, twice as much as in 2009, and that is projected to grow by half again by 2015. (By comparison, the city has 220,000 hectares of tea of all kinds, roughly the same as three years ago.)

The economic impetus is clear. A family with a hectare of coffee can earn more than $10,000 a year, triple the amount for tea, and five times more than for maize or rice, says Mr Liu. Nestlé, along with the Chinese government and the United Nations Development Programme, helped jump-start coffee production in the area in the late 1980s. Yunnan's first coffee growers, 19th-century European missionaries, found a suitable climate for their bitter juice, but little native interest in drinking it. Now Yunnan accounts for almost all the coffee grown in China. Other buyers have followed Nestlé in recent years, and demand has outstripped supply. Beans are sold at the global price, which last year briefly topped 40 yuan ($6.30) a kilo, and is now about 30 yuan. Three years ago, the price was only 16 yuan a kilo.

Many not-so-decent beans are included. The high price of coffee last year prompted farmers to cash in by selling the bad with the good. One local exporter, Liu Minghui, rejected a big share of the beans offered to him last year—he has a brand name to protect, after all: Starbucks, a global coffee chain, has agreed to buy a majority stake in his coffee business, Ai Ni. In 2010 Howard Schultz, the Starbucks chief executive, stopped by for a visit. Mr Liu at the coffee office says it was the first time a foreigner had come to Pu'er by private jet. Look out for a town called Starbucks some time soon.