NEW ZEALAND'S biggest customer, supplier and investor is Australia, which is also the owner of its biggest banks. Unsurprisingly, its economy shares many of its bigger neighbour's bad habits: an unsustainable housing boom (from 2001-09 New Zealand's house prices more than doubled); heavy household debts (which, like Australia's, exceed 150% of disposable income); and a chronic current-account deficit, which, until recently, had left the country more in hock to foreigners than Greece is.

But New Zealand is also starting, belatedly, to emulate Australia's resource-driven strengths. In April it recorded its biggest trade surplus in history: NZ$1.1 billion ($890m), or about 7% of GDP at an annual rate. Strong overseas demand has pushed its terms of trade (the price it fetches for its exports, relative to the price it must pay for imports) to a 37-year high (see chart).

Looming large in this surplus are dairy products—butter, cheese and especially milk powder—which accounted for over a quarter of New Zealand's merchandise exports. With its swathes of rain-fed pastures, New Zealand now claims a third of world dairy exports. For comparison, that is twice Saudi Arabia's share of world oil exports.

Just as Australia has benefited from China's industrial appetite, so New Zealand sells vast quantities of milk powder to Chinese consumers wary of local brands damaged by food-safety scandals. Chinese tourists sometimes stock up on baby formula on their travels and sell the tins back home. Some supermarkets in New Zealand impose four-can limits on customers.

Other opportunists are home-grown. In March Kiaora New Zealand International began selling formula under the brand “Heitiki”, a Maori word. Heitiki claimed to be a favourite local brand, even though it had never been sold in New Zealand. The Ministry of Agriculture and Forestry, which was not familiar with the company, was worried it might be an unregistered manufacturer, and possibly in breach of safety regulations. A government minister, for her part, was upset that the firm had used imagery the Maori regard as properly theirs. Kiaora, it turned out, had outsourced the formula-making to a properly registered and regulated factory. But it nonetheless apologised for its “insensitivity” to the Maori people. Somewhere between the factory and the supermarket shelf, it had tainted its baby formula with cultural politics.

Baby formula is one of the country's growth “stars”, according to Gerry Brownlee, New Zealand's former minister for economic development. He commissioned a 2010 report which showed that the wholesale price of infant formula in Singapore was ten times greater than the value of its chief ingredient, skim-milk powder. New Zealand's food exports, the report believes, should move from the “walls” of supermarkets, where basics such as milk, meat, fruit and vegetables are stored, to the central aisles, which stock processed foods. Only then will New Zealand achieve its goal of increasing income per head by three-fifths in 15 years—a strategy also known as “catch up with Australia by 2025”.