Mexico is now Latin America’s largest annual automobile manufacturer, with 2014 production outpacing that of Brazil for the first time since 2002.

Mexico produced 3.4 million automobiles last year, up 10.2% over 2013, while Brazil’s production dropped by 15.3% to 3.1 million, according to the International Organization of Motor Vehicle Manufacturers. The relative weakness in the Brazilian market prompted policymakers from the two countries to extend an import quota system for four more years in March, rather than implement a free-trade policy, as was originally planned.

Exports fueled the expansion in Mexico, which sells around 80% of the automobiles it produces in foreign markets. The United States is by far the largest of those markets, but demand for Mexico’s automobiles is rising quickly in other parts of the world. Automotive exports to Asia more than doubled last year, while exports to Latin America rose 18%. The country’s growing prowess as a manufacturing hub, helped by its strategic location and affinity for free-trade agreements, has investment pouring into the automotive sector. In the past year, BMW, Kia, Daimler AG and Renault-Nissan have all announced plans for new facilities in Mexico.

In contrast, Brazil exports roughly 11% of its automobiles, relying instead on domestic demand. Falling commodity prices have dampened that demand by dragging down overall economic growth. Tax revenue has also dropped, limiting potential policy measures to help the industry. As an example, the government has not renewed a tax cut on automotive purchases that expired at the end of 2013.

The rapid growth of Brazil’s domestic car market in the past decade, coupled with the country’s steep tariffs, prompted automobile manufacturers to set up and expand operations domestically. Those investments are now pushing up production capacity even as demand falls. Guido Vildozo, Latin American automotive expert for IHS Global Insight, explains that around $238 million was invested in the Brazilian automotive market between 2008 and 2018, assuming it was going to explode, but it didn’t.

Mexico will also face challenges, says Vildozo. “It is important to keep an eye on investments coming into Mexico and watch how they develop over time. Finding qualified personnel and suppliers that can support growing operations will not be easy.”