The current account deficit was equivalent to 0.2% of gross domestic product (GDP), the smallest since Mexico ran a surplus in 1987, according to central bank data.
Aside from the January-March period, Mexico ran up current account surpluses in all remaining quarters as businesses reined in investment on plant and equipments, curbing the outflow of dollars from Latin America's second-biggest economy.
"These figures are consistent with an economy that isn't growing," said Benito Berber, chief Mexico economist for bank Natixis. "When there's economic contraction you're obviously importing less," he added.
Mexican firms have been unsettled by President Andres Manuel Lopez Obrador's economic policies, helping to push the country last year into its first recession in a decade.
At the same time, Mexico last year became the United States' biggest trade partner as US President Donald Trump's tariff war with China put a major dent in US-Chinese commerce.
A breakdown of the central bank's current account data showed that goods exports last year rose to $461.1 billion from $450.7 billion a year earlier. By contrast, goods imports slipped to $455.3 billion from $464.3 billion in 2018.