“YOU want certainty? Knock at our door and ask our permission.” Dean Sayers, chief of the Batchewana First Nation of Ojibways, a Canadian indigenous group, delivered this blunt advice to a room packed with mining executives last year. He came to the industry’s annual convention because he was tired of “the hillbilly attitudes” of developers “who want to do business in our neck of the woods”, on the north-eastern corner of Lake Superior. In 1849 Ojibways fired a cannon into a copper mine that had gone ahead without their approval.

These days Canada’s aboriginal groups use public pressure, backed by legal action, to protect their lands against exploitation by outsiders. This month the government of British Columbia reached agreement with forest companies, environmental groups and 26 First Nations communities to protect from logging an area on the Pacific coast larger than Belgium—newly dubbed the Great Bear Rainforest. The deal, which allows logging and mining in areas aboriginals have agreed to, is the culmination of a long public-relations campaign (choosing the Kermode bear as its mascot was a masterstroke). It would have got nowhere without centuries of treaty-making and decades of case law to back it up.

Aboriginals’ rights were outlined in a royal proclamation of 1763, when European settlers needed their help to survive, and restated in Canada’s 1982 constitution. As they became savvier, and resource companies grew more ambitious, litigation increased. The federal aboriginal affairs agency is party to 554 proceedings involving such rights (not all of which concern resource firms). That does not include disputes between aboriginal groups and firms. Projects as diverse as seismic testing for mineral deposits in Arctic waters and fracking in the west face challenges. Until 1951 such lawsuits were barred.

They are expensive and can drag on for years; the outcome is never assured. The Tsilhqot’in, who filed suit in 1998 against logging on their ancestral lands in British Columbia, finally won in 2014 and now have title to 1,750 square km (1,100 square miles). But the Innu of Ekuanitshit in Quebec last year lost their bid to stop the Muskrat Falls hydropower project, which they say will affect caribou herds.

Some big projects are caught in legal limbo. The Northern Gateway pipeline, which is to bring crude oil from Alberta to Canada’s west coast, has been stalled for more than a decade, largely because of opposition from First Nations groups along its route, some of them parties to the Great Bear agreement. The Pacific Northwest liquefied natural gas project, backed by Petronas, a Malaysian state-owned firm, has offered C$1 billion ($726m) in benefits over 40 years to the Lax Kw’alaams nation of northern British Columbia. That has not allayed fears that the project would destroy salmon fisheries.

When such disputes are unresolved, the price can be high. The Northern Gateway pipeline would add C$300 billion to Canada’s GDP over 30 years. Aboriginals are finding ways to share gains from such projects while minimising the damage they cause. The courts “are getting closer to what we want”, says Mr Sayers. “But they are not there yet.”