General Motors may be winding down some of its plants in the United States and Canada, but its Mexican operations are thriving.

So much so, that GM is on track to end 2018 as the largest producer and exporter of automobiles in Mexico, according to a report from GM Authority. It will be for the first time in recent history that the U.S. automaker has risen to that position.

A lot of that success comes from GM’s reorganization of its Mexican plants to produce crossovers, SUVs, and pickup trucks. Since those vehicles happen to be the most popular right now, as opposed to slower-selling sedans, growth has come naturally.

The General started making changes to its Mexican operations in mid-2017 in response to changing demands of North American customers. The carmaker stopped production of the Chevrolet Aveo (its best-selling model in Mexico) and Chevrolet Sonic, allocating the resulting capacity at two plants to the all-new Chevrolet Equinox and GMC Terrain, as well as the first-gen Chevy Trax.

Chevrolet Cheyenne – 2019

It also makes the all-new Chevrolet Silverado (sold as the Cheyenne locally) and GMC Sierra full-size pickups in Mexico, and will soon allocate additional capacity to the 2019 Blazer crossover in the wake of the recently announced plans to discontinue the Chevrolet Cruze.

As a result of all these moves and the fact that Nissan mostly makes sedans in Mexico, GM replaced the Japanese company as the country’s largest carmaker in 2018. Through November, GM built 801,163 vehicles, up 67,000 units compared to the same period last year.

The vehicles were built at GM’s three plants in Mexico: San Luis Potosi (Chevrolet Trax, GMC Terrain), Silao (Chevrolet Silverado, GMC Sierra), and Ramos Arizpe (Chevrolet Blazer and Cruze). During the same period, Nissan built 717,108 vehicles, accounting for a decrease of 71,000 units.

The increase in production also makes GM the largest exporter of automobiles in Mexico, with 693,782 units so far this year. Most of the exports go to the United States and Canada, but the automaker also benefits from Mexico’s trade agreements with South American countries.