WHEN life hands you lemons, goes the old saw, make lemonade. But what if life should hand you 18m hectares (44m acres) of dead trees? That is the problem faced by the province of British Columbia in Canada, which could lose over half its pine trees to the depredations of the fearsome mountain pine beetle. The beetle, no bigger than a grain of rice, is native to the forests of Western North America, where it kills trees by releasing a blue stain fungus that prevents the flow of water and nutrients. While the insect was historically kept in check by spells of cold weather, years of mild winters have unleashed an outbreak whose spread and severity is unlike anything seen previously. As a result, the province is peppered with billions of dead, grey trees. If they are simply left standing, they will eventually either decay or burn in forest fires. In either case, they will release the carbon dioxide they stored while growing, swelling Canada's total carbon footprint from 2000 to 2020 by 2%. So, to deal with the problem, in 2009 British Columbia's parliament passed a Wood First Act that requires wood to be considered as the primary construction material in all new buildings erected with public money. The striking Richmond Olympic Oval for example, used for ice-skating events during the 2010 Vancouver Winter Olympics, features 1m board feet (2,360 cubic metres) of beetle-affected wood. But harvesting trees for traditional purposes will make barely a dent in the massive wood pile, especially while one of Canada's main outlets for wood, the American residential-housing market, remains depressed. Other big customers, such as the Japanese, dislike the blue-tinged lumber. One solution is turning the beetle-kill pine (BKP), as the stuff is known, into innovative wood products. Cross-laminated timber (CLT) is a layered panel built up from thin wooden boards, glued together in alternate orientations. Not only can the panels be made from BKP, hiding the worst-stained wood, they are actually robust, rigid and fire-resistant enough to replace the pre-fabricated concrete panels used in many commercial buildings. Buildings made with CLT use six times as much wood as those made with conventional framing techniques, but given the material's abundance that might be seen as a virtue.

FP Innovations, a private non-profit forest-research organisation based in Vancouver, estimates that using engineered wood for commercial construction could unlock 3 billion board feet of demand for BKP. It would also help to reduce the construction industry's reliance on concrete, which today accounts for around 5% of global carbon emissions.

European architects have been using CLT for years: a nine-storey CLT apartment block in London is the tallest wooden building in the world, and plans are afoot in Norway to build a 14-storey block by 2014. But their Canadian counterparts are now thinking even bigger. Michael Green, an architect based in Vancouver, has come up with a building system that he says enables 20-storey skyscrapers to be erected safely using engineered wood products like CLT. He is now offering the system free to architects worldwide under an open-source licence.

Canadian researchers have discovered other uses for BKP. Sorin Pasca, a graduate student at the University of Northern British Columbia, found that rain and snow conveniently wash out sugars and other organic compounds from dead pine trees. By grinding up the dry BKP and adding it to normal cement, he created a hybrid material that is waterproof, fire-resistant and pourable like concrete but that can be worked, cut and nailed or drilled like wood. The material, dubbed Beetlecrete, has already been used to make countertops, benches and planters.

Even more esoteric uses for BKP are on the table. Nanocrystalline cellulose, made up of microscopic needle-like fibres, is a lightweight, ultra-rigid material that can be extracted from wood pulp. Currently used to improve the durability of paints and varnishes, nanocrystalline cellulose promises strong, iridescent films that may find uses in industries ranging from optical computing to cosmetics. And, as a last resort, dead and fallen pine trees can feed British Columbia's 800MW of bio-mass power plants, which burn pellets of BKP and other waste wood to generate electricity.

While technology marches on, regulations lag behind. British Columbia recently revamped its building codes to allow taller buildings to be made from wood, but still capped their height at a modest six storeys. (In comparison, Britain, Norway and New Zealand place no height restrictions on safely-made wooden skyscrapers.) That will need to change if products like CLT are to help solve the pine-beetle problem—and quickly. If dead trees are not harvested within 10 to 15 years of being killed, they will have rotted or burned to the point of uselessness. Like freshly-made lemonade, BKP has a shelf-life.