(Bloomberg) -- Mexico’s economy grew slightly more than analysts expected at the end of 2022 ahead of a likely slowdown this year as a higher interest rate tests the strength of resilient demand.

Gross domestic product expanded 0.4% in the fourth quarter from the previous three months, compared with the 0.3% median estimate of analysts surveyed by Bloomberg. From the same period a year ago, the economy grew 3.5%, according to preliminary data released by Mexico’s national statistics institute on Tuesday. Overall, the economy expanded 3% in 2022.

The decline in economic growth in the US has been expected to translate into a downturn in Mexico, as consumers’ weakening demand for everything from electronics to cars hits the local manufacturing sector. Banco de Mexico’s prolonged rate-hiking cycle is expected to end soon, as inflation that’s come off a peak may provide policymakers room for maneuver.

The agriculture sector grew 6.6% in the fourth quarter from the year prior, while manufacturing grew 3% and the services sector 3.4%. 

Inside the Smuggling Economy on the US-Mexico Border: Big Take Podcast 

What Bloomberg Economics Says

Fourth-quarter GDP data showed Mexican activity is quickly losing momentum after strong growth earlier in 2022. The economy is facing weaker domestic demand and lower exports amid waning tailwinds from reopening, tighter monetary conditions and slower US growth. The results were in line with our forecast for low growth in 1H23 before falling in 2H, dragged by a US recession.

— Felipe Hernandez, Latin America economist

Click here for full report

Lifesaver

Mexico’s Deputy Finance Minister Gabriel Yorio said Monday that consumption and private investment had aided the economy in recent months, and he predicted that better incomes and labor conditions would contribute to growth in 2023. A possible recession in the US among other headwinds has analysts surveyed by Citi expecting an expansion of just 0.9% in 2023. 

Other factors such as nearshoring, which refers to the movement of companies to Mexico to be closer to the North American market, are expected to continue providing a boost to the economy, despite some of the concerns about the decline in export growth in the short-term.

“Nearshoring was also a lifesaver that explains parts of the growth last year,” said Gabriela Siller, director of economic analysis at Banco BASE. 

The International Monetary Fund on Monday raised its forecast for Mexico’s 2023 GDP growth to 1.7% from 1.2%.

Meanwhile, Deutsche Bank AG analysts wrote in a note published Monday that most of Latin America’s major economies shrank in late 2022, and in Mexico’s case the persistence of high core inflation, the gradual tightening of financial conditions and the deterioration of the external backdrop were all headwinds.

Economists in the US are expecting that Federal Reserve policymakers will continue to increase interest rates and that there will be a brief recession in 2023, after which the central bank will cut borrowing costs. In the statement accompanying its last decision Banco de Mexico indicated that it would hike rates at its next meeting in February, without specifying by how much.

Banco de Mexico raised its key interest rate to 10.5% in December.

Read More: Mexico’s AMLO Pledges Pemex Financing that Sparks Bond Rally

“The services sector is already decelerating and the manufacturing sector is under pressure because of the more complex conditions in the United States,” said Andres Abadia, chief Latin America economist at Pantheon Macroeconomics. “But the Mexican economy won’t collapse.”

--With assistance from Rafael Gayol.

(Updates with annual growth rate in second paragraph, sector data in fourth, analysis starting in fifth.)

©2023 Bloomberg L.P.