OPPOSITE Rio de Janeiro's best-known shopping mall, just before the tunnel that takes drivers to the beach resorts of Copacabana and Ipanema, stands a gleaming new showroom for JAC Motors, a state-owned Chinese car maker. The prominence of the location is appropriate: imported Chinese cars have suddenly become a visible presence on Brazil's roads. This has alarmed Brazil's car industry and President Dilma Rousseff's government. Last month a 30-percentage-point tax increase on cars with less than 65% local content took effect, taking the tax on some imported models to a punitive 55%—on top of import tariffs.

The tax increase is an unusually blatant act of protectionism. It almost certainly violates the rules of the World Trade Organisation, of which Brazil is normally an enthusiastic supporter. It shows how sensitive the government of President Dilma Rousseff is to claims that the country is suffering “de-industrialisation”.

Although the latest figure shows industrial production increasing slightly, it has been broadly flat for more than a year. Economic growth has fallen sharply. But consumer demand remains robust, rising 4.1% last year, says the Central Bank. A bigger share of the market is going to importers—China in particular. Imports of Chinese cars rose almost fivefold last year; the new year has brought complaints of dumping of Chinese mobile phones and shoes.

With extraordinary speed, China has become Brazil's most important economic partner: total trade between the two countries has risen 17-fold since 2002. But frictions are increasing almost as fast. Although Brazil enjoys a big overall trade surplus with China, most of its exports are of commodities (mainly iron ore, soya beans and crude oil). It has a big deficit in manufactures (see chart). The reasons are not hard to spot. In recent years Brazil's manufacturers have been hobbled by a strong currency, high interest rates, high taxes, poor infrastructure and a poorly educated workforce. “Brazil faces a big competitive challenge, and the relationship with China only dramatises that,” says Sérgio Amaral, a former industry minister who chairs the Brazil-China Business Council. The government's response is a mix of short-term protectionist measures combined with modest steps towards more constructive longer-term policy changes. The tax rise on cars was announced last September, as part of a new industrial policy. The aim was to bully carmakers without plants in Brazil to hurry up and build them. This seems to be working: JAC Motors, BMW, and Jaguar Land Rover, a unit of India's Tata Motors, have all announced plans to build factories in Brazil since the import tax was unveiled. The industrial policy also features an experimental cut in the payroll tax for footwear, textile, furniture and software firms. But officials are at pains to point out that, rather than help specific industries, the main thrust of the new policy is to try to boost competitiveness more generally by promoting innovation, higher education and training.

Many Brazilian industrialists distinguish between Chinese and other competitors. “We don't believe in protection against efficiency,” insists Roberto Giannetti of São Paulo's Federation of Industries (FIESP). But he adds that “today we can't accept China as a fair trader”. FIESP says it did not want the tax increase on imported cars. But it complains that China is dumping diverted exports from depressed Europe. Meanwhile, Brazilian manufacturers trying to export to China face steep non-tariff barriers on manufactured goods, such as obstructive state purchasing agents. Rubens Ricúpero, a former finance minister, thinks that rather than acquiesce in the disappearance of its industries, Brazil will move towards managed trade with China, at least in some sectors.

Two things may serve to reduce some of the trade tensions. The first is that Chinese investment in Brazil is taking off. Until 2009 this amounted to only about $500m. But in 2010 investment of $19 billion was announced, and $12.7 billion finalised, according to calculations by the Brazil-China Business Council, making China the largest single foreign investor in Brazil that year. Of that sum, just three acquisitions (two of oil stakes, and one in electricity distribution) accounted for more than $11 billion. But Chinese firms are also starting to build manufacturing plants in Brazil.

The second emollient is that the real has depreciated by 17% against the dollar since its peak in late July. That is partly because investors fled emerging markets but also because of government intervention, in the form of taxes on short-term capital inflows. At the same time, the Central Bank has taken advantage of the economy's soft patch to cut its benchmark interest rate, from 12.5% in August to 11%. With inflation at 6.5%, the real interest rate is much lower than at any other time in the past decade.

But industry also wants to see fewer taxes, cheaper energy, less bureaucracy and better transport networks, says Paulo Skaf, FIESP's president. On these things the government is moving far more slowly, if at all. However narrowly targeted, protectionism will not only raise prices in Brazil but risks sending the wrong message to businesses. Across Latin America, trade with China is growing but partly at the expense of intra-regional trade in manufactures. Brazil should lead a move to tear down all trade barriers within Latin America, thus turning the Chinese challenge into an opportunity, says Mr Amaral.