IN 1994 America’s economy was barely three years into its longest post-war expansion. Oil production fell to its lowest level for 40 years. Shares in a Steve Jobs-less Apple could be picked up for little more than a dollar; Jeff Bezos left his job at a hedge fund to set up a new kind of retailer, after learning of the fast-growing use of the internet. At the start of that year the North America Free-Trade Agreement came into force. It committed America, Canada and Mexico to eliminate most of the tariffs on goods between them within a decade.

NAFTA was controversial from the start. Its critics have grown louder over time, despite its success in boosting trade and investment. Weeks before his election as president, Donald Trump called NAFTA “the worst trade deal maybe ever” and said he would junk it. In April he relented: a realisation that lots of Trump-voting states rely heavily on trade with Mexico and Canada may have swayed him. Instead, on August 16th, trade representatives of the three signatories gathered in Washington, DC, to renegotiate the pact. Whatever their provenance, such talks are an opportunity. A deal agreed on in the early 1990s is ill-fitted for a much-changed economic landscape. Indeed there is a real possibility that Mr Trump, far from killing free trade in North America, might make it freer.

That will happen only if each side concedes on its big sticking-points (see article). Mr Trump’s demand that an upgraded NAFTA must narrow America’s trade deficits with Canada and Mexico is pointless. This is not only because such a demand asks too much of its partners. America’s overall balance of trade is ultimately determined by its investment and saving. Even if tinkering with NAFTA were to reduce the bilateral deficits with Canada and Mexico, unless America saves more, deficits with other countries would increase.

Yet there are three big areas in which there is a lot of scope to improve NAFTA to the benefit of all its signatories. The first is digital trade, which has burgeoned since NAFTA was first crafted. A growing fraction of cross-border commerce starts on a website or a smartphone, or relies on the internet to produce and deliver goods and services. That has made it easier for small traders to sell across borders. One way to boost such e-commerce is to free more low-value trade from the burden of customs paperwork. Setting clear rules and standards for electronic payments, security and documentation would benefit North America’s digital traders, big and small. A second area ripe for improvement is energy. When NAFTA was signed, in 1992, America was in secular decline as a big energy producer. The fracking revolution changed that. America produced an average of 9.4m barrels of oil a day in 2015, up by 80% compared with a decade earlier. Mexico has changed, too. Reforms now allow greater foreign investment in its oil and gas industry. NAFTA opened up trade between America and Canada but exempted Mexico from some of its obligations. America now does ten times as much trade in electricity with Canada as with Mexico. An upgraded NAFTA could bring about an integrated North American energy market. That will require a streamlining of the process by which America grants permits for cross-border grids and pipelines.

Don’t call it TPP-lite

A third way in which NAFTA could be improved lies in how the pact is policed. All sides grumble about the present set-up. America’s more recent trade agreements with, for instance, South Korea and Colombia include binding safeguards against the use of child or forced labour. Such strictures could be wired into a revised agreement in order to address concerns about a race to the bottom in labour and environmental standards.

Trade talks tend to founder on the details, which is why they often take years to conclude. The negotiations for NAFTA must be completed in a few months, before campaigning starts for Mexico’s presidential election in 2018. Yet a deal is still possible. Robert Lighthizer, America’s trade representative, might be inclined to settle NAFTA, if only to get on with picking a fight with China over its lax observance of intellectual-property rights (see article).

In addition, parts of a new pact can be cut and pasted from the Trans-Pacific Partnership (TPP), a 12-country trade pact that Mr Trump declined to ratify. To junk a pact only to recycle it is scarcely a coherent trade policy. But if it results in an improved NAFTA, the seven years spent negotiating TPP will not have gone completely to waste.